-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdistributions.html
More file actions
746 lines (671 loc) · 52 KB
/
distributions.html
File metadata and controls
746 lines (671 loc) · 52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>tyche.distributions — Tyche v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="tyche.probability" href="probability.html" />
<link rel="prev" title="tyche.individuals" href="individuals.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-tyche.distributions">
<span id="tyche-distributions"></span><h1>tyche.distributions<a class="headerlink" href="#module-tyche.distributions" title="Permalink to this heading">¶</a></h1>
<p>This module contains several classes of probability distributions
that can be easily manipulated (e.g., shift, scale, or add to
distributions to get new distributions).</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">person_height_cm</span> <span class="o">=</span> <span class="n">NormalDist</span><span class="p">(</span><span class="n">mean</span><span class="o">=</span><span class="mi">180</span><span class="p">,</span> <span class="n">std_dev</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
<span class="n">heel_height_cm</span> <span class="o">=</span> <span class="n">NormalDist</span><span class="p">(</span><span class="n">mean</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">std_dev</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span>
<span class="n">total_height_cm</span> <span class="o">=</span> <span class="n">person_height_cm</span> <span class="o">+</span> <span class="n">heel_height_cm</span>
<span class="n">total_height_ft</span> <span class="o">=</span> <span class="n">total_height_cm</span> <span class="o">*</span> <span class="mf">0.0328084</span>
<span class="n">hoop_height_ft</span> <span class="o">=</span> <span class="mi">10</span>
<span class="n">distance_to_hoop_ft</span> <span class="o">=</span> <span class="n">hoop_height_ft</span> <span class="o">-</span> <span class="n">total_height_ft</span>
<span class="c1"># Result: distance_to_hoop_ft = Normal(mean=3.930, std_dev=0.191)</span>
</pre></div>
</div>
<p>The following probability distributions are currently available:</p>
<ul class="simple">
<li><p><a class="reference external" href="#tyche.distributions.UniformDist">UniformDist</a>: A uniform probability distribution.</p></li>
<li><p><a class="reference external" href="#tyche.distributions.NormalDist">NormalDist</a>: A normal probability distribution.</p></li>
</ul>
<p>This aims to allow the more flexible and intuitive use of probability
distributions, by reducing the amount of manual work that is required
to manipulate and use them.</p>
<dl class="py exception">
<dt class="sig sig-object py" id="tyche.distributions.TycheDistributionsException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">TycheDistributionsException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TycheDistributionsException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TycheDistributionsException" title="Permalink to this definition">¶</a></dt>
<dd><p>An exception type that is thrown when errors occur in
the construction or use of probability distributions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>message</strong> (<em>str</em>) – A message describing the reason that this
exception was raised.</p>
</dd>
</dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.ProbDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">ProbDist</span></span><a class="reference internal" href="_modules/tyche/distributions.html#ProbDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ProbDist" title="Permalink to this definition">¶</a></dt>
<dd><p>A probability distribution over a space of numeric values.</p>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ProbDist.sample">
<span class="sig-name descname"><span class="pre">sample</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rng</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ProbDist.sample"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ProbDist.sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Samples random values from this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rng</strong> (<em>Generator</em>) – A NumPy random number generator that is used to generate random samples
from this distribution.</p></li>
<li><p><strong>shape</strong> (<em>Optional</em><em>[</em><em>Union</em><em>[</em><em>int</em><em>, </em><em>tuple</em><em>]</em><em>]</em>) – Configures the format of the returned samples from this probability
distribution. By default, a single sampled value is returned. If an int
is provided, then a NumPy array of <cite>shape</cite> values will be returned. If a
tuple is provided, then a NumPy array of sampled values will be returned
with the tuple used as the array’s shape.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">ContinuousProbDist</span></span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#tyche.distributions.ProbDist" title="tyche.distributions.ProbDist"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProbDist</span></code></a></p>
<p>A probability distribution over a continuous space of numeric values.</p>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.truncate">
<span class="sig-name descname"><span class="pre">truncate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">minimum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maximum</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.truncate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.truncate" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new distribution that represents the truncation of
this distribution to the range [minimum, maximum].</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>minimum</strong> (<em>float</em>) – A lower limit on the numeric values in this distribution
after truncation.</p></li>
<li><p><strong>maximum</strong> (<em>float</em>) – An upper limit on the numeric values in this distribution
after truncation.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><em>ContinuousProbDist</em></a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.sample">
<span class="sig-name descname"><span class="pre">sample</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rng</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.sample"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Samples random values from this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rng</strong> (<em>Generator</em>) – A NumPy random number generator that is used to generate random samples
from this distribution.</p></li>
<li><p><strong>shape</strong> (<em>Optional</em><em>[</em><em>Union</em><em>[</em><em>int</em><em>, </em><em>tuple</em><em>]</em><em>]</em>) – Configures the format of the returned samples from this probability
distribution. By default, a single sampled value is returned. If an int
is provided, then a NumPy array of <cite>shape</cite> values will be returned. If a
tuple is provided, then a NumPy array of sampled values will be returned
with the tuple used as the array’s shape.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.cdf">
<span class="sig-name descname"><span class="pre">cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the cumulative density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the cumulative density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.mean">
<span class="sig-name descname"><span class="pre">mean</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.mean"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.mean" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the mean value of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.variance">
<span class="sig-name descname"><span class="pre">variance</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.variance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the variance of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.std_dev">
<span class="sig-name descname"><span class="pre">std_dev</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.std_dev"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.std_dev" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the standard deviation of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.pdf">
<span class="sig-name descname"><span class="pre">pdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.pdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.pdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the probability density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the probability density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.ContinuousProbDist.inverse_cdf">
<span class="sig-name descname"><span class="pre">inverse_cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prob</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#ContinuousProbDist.inverse_cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.ContinuousProbDist.inverse_cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the inverse cumulative density function of this distribution
at <cite>prob</cite>. This involves calculating the value in this distribution
that would produce the given probability, <cite>prob</cite>, if it was used to
evaluate the cumulative density function of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>prob</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the inverse cumulative
density function of this distribution. If a numerical value is
provided, a numerical value is returned. If a NumPy array of values
is provided, then a NumPy array of values will be returned that
matches the shape of <cite>prob</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">LinearTransformContinuousProbDist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dist</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shift</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContinuousProbDist</span></code></a></p>
<p>Applies a linear transformation (scale + shift) to a ContinuousProbDist.
The scaling of values is performed before the shift of values.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dist</strong> (<a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><em>ContinuousProbDist</em></a>) – A delegate continuous probability distribution to scale and shift.</p></li>
<li><p><strong>shift</strong> (<em>float</em>) – A shift to be applied to the delegate distribution, <cite>dist</cite>, after
the scale is applied.</p></li>
<li><p><strong>scale</strong> (<em>float</em>) – A scale to be applied to the delegate distribution, <cite>dist</cite>, before
the shift is applied.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist.sample">
<span class="sig-name descname"><span class="pre">sample</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rng</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist.sample"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist.sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Samples random values from this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rng</strong> (<em>Generator</em>) – A NumPy random number generator that is used to generate random samples
from this distribution.</p></li>
<li><p><strong>shape</strong> (<em>Optional</em><em>[</em><em>int</em><em>]</em>) – Configures the format of the returned samples from this probability
distribution. By default, a single sampled value is returned. If an int
is provided, then a NumPy array of <cite>shape</cite> values will be returned. If a
tuple is provided, then a NumPy array of sampled values will be returned
with the tuple used as the array’s shape.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist.cdf">
<span class="sig-name descname"><span class="pre">cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist.cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist.cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the cumulative density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the cumulative density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist.variance">
<span class="sig-name descname"><span class="pre">variance</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist.variance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist.variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the variance of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist.pdf">
<span class="sig-name descname"><span class="pre">pdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist.pdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist.pdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the probability density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the probability density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.LinearTransformContinuousProbDist.inverse_cdf">
<span class="sig-name descname"><span class="pre">inverse_cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prob</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#LinearTransformContinuousProbDist.inverse_cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.LinearTransformContinuousProbDist.inverse_cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the inverse cumulative density function of this distribution
at <cite>prob</cite>. This involves calculating the value in this distribution
that would produce the given probability, <cite>prob</cite>, if it was used to
evaluate the cumulative density function of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>prob</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the inverse cumulative
density function of this distribution. If a numerical value is
provided, a numerical value is returned. If a NumPy array of values
is provided, then a NumPy array of values will be returned that
matches the shape of <cite>prob</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.TruncatedContinuousProbDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">TruncatedContinuousProbDist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dist</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">minimum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maximum</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TruncatedContinuousProbDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TruncatedContinuousProbDist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContinuousProbDist</span></code></a></p>
<p>Applies a truncation to a ContinuousProbDist. All values below <cite>minimum</cite>
and above <cite>maximum</cite> are discarded.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dist</strong> (<a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><em>ContinuousProbDist</em></a>) – A delegate continuous probability distribution to truncate.</p></li>
<li><p><strong>minimum</strong> (<em>float</em>) – The lower bound to use to truncate the delegate distribution.</p></li>
<li><p><strong>maximum</strong> (<em>float</em>) – The upper bound to use to truncate the delegate distribution.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.TruncatedContinuousProbDist.truncate">
<span class="sig-name descname"><span class="pre">truncate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">minimum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maximum</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TruncatedContinuousProbDist.truncate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TruncatedContinuousProbDist.truncate" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a new distribution that represents the truncation of
this distribution to the range [minimum, maximum].</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>minimum</strong> (<em>float</em>) – A lower limit on the numeric values in this distribution
after truncation.</p></li>
<li><p><strong>maximum</strong> (<em>float</em>) – An upper limit on the numeric values in this distribution
after truncation.</p></li>
</ul>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><em>ContinuousProbDist</em></a></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.TruncatedContinuousProbDist.cdf">
<span class="sig-name descname"><span class="pre">cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TruncatedContinuousProbDist.cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TruncatedContinuousProbDist.cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the cumulative density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the cumulative density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.TruncatedContinuousProbDist.pdf">
<span class="sig-name descname"><span class="pre">pdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TruncatedContinuousProbDist.pdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TruncatedContinuousProbDist.pdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the probability density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the probability density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.TruncatedContinuousProbDist.inverse_cdf">
<span class="sig-name descname"><span class="pre">inverse_cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prob</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#TruncatedContinuousProbDist.inverse_cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.TruncatedContinuousProbDist.inverse_cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the inverse cumulative density function of this distribution
at <cite>prob</cite>. This involves calculating the value in this distribution
that would produce the given probability, <cite>prob</cite>, if it was used to
evaluate the cumulative density function of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>prob</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the inverse cumulative
density function of this distribution. If a numerical value is
provided, a numerical value is returned. If a NumPy array of values
is provided, then a NumPy array of values will be returned that
matches the shape of <cite>prob</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.UniformDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">UniformDist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">minimum</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">maximum</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#UniformDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.UniformDist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContinuousProbDist</span></code></a></p>
<p>A uniform probability distribution over the range [minimum, maximum].
All values within this range have equal probability of being sampled.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>minimum</strong> (<em>float</em>) – The lower bound on values that could be sampled from this
uniform probability distribution.</p></li>
<li><p><strong>maximum</strong> (<em>float</em>) – The upper bound on values that could be sampled from this
uniform probability distribution.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.UniformDist.cdf">
<span class="sig-name descname"><span class="pre">cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#UniformDist.cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.UniformDist.cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the cumulative density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the cumulative density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.UniformDist.variance">
<span class="sig-name descname"><span class="pre">variance</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#UniformDist.variance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.UniformDist.variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the variance of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.UniformDist.pdf">
<span class="sig-name descname"><span class="pre">pdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#UniformDist.pdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.UniformDist.pdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the probability density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the probability density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.UniformDist.inverse_cdf">
<span class="sig-name descname"><span class="pre">inverse_cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prob</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#UniformDist.inverse_cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.UniformDist.inverse_cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the inverse cumulative density function of this distribution
at <cite>prob</cite>. This involves calculating the value in this distribution
that would produce the given probability, <cite>prob</cite>, if it was used to
evaluate the cumulative density function of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>prob</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the inverse cumulative
density function of this distribution. If a numerical value is
provided, a numerical value is returned. If a NumPy array of values
is provided, then a NumPy array of values will be returned that
matches the shape of <cite>prob</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">tyche.distributions.</span></span><span class="sig-name descname"><span class="pre">NormalDist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mean</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">std_dev</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#tyche.distributions.ContinuousProbDist" title="tyche.distributions.ContinuousProbDist"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContinuousProbDist</span></code></a></p>
<p>A normal probability distribution centered around <cite>mean</cite> with a
standard deviation of <cite>std_dev</cite>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mean</strong> (<em>float</em>) – The mean of this normal distribution.</p></li>
<li><p><strong>std_dev</strong> (<em>float</em>) – The standard deviation of this normal distribution.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist.cdf">
<span class="sig-name descname"><span class="pre">cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist.cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist.cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the cumulative density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the cumulative density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist.variance">
<span class="sig-name descname"><span class="pre">variance</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist.variance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist.variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the variance of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist.std_dev">
<span class="sig-name descname"><span class="pre">std_dev</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist.std_dev"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist.std_dev" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates to the standard deviation of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist.pdf">
<span class="sig-name descname"><span class="pre">pdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist.pdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist.pdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the probability density function of this distribution
at <cite>x</cite>. The resulting value should fall in the range [0, 1],
although numerical error can cause slightly lower or higher
values to be returned.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>x</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the probability density
function of this distribution. If a numerical value is provided,
a numerical value is returned. If a NumPy array of values is
provided, then a NumPy array of values will be returned that
matches the shape of <cite>x</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="tyche.distributions.NormalDist.inverse_cdf">
<span class="sig-name descname"><span class="pre">inverse_cdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prob</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/tyche/distributions.html#NormalDist.inverse_cdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#tyche.distributions.NormalDist.inverse_cdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the inverse cumulative density function of this distribution
at <cite>prob</cite>. This involves calculating the value in this distribution
that would produce the given probability, <cite>prob</cite>, if it was used to
evaluate the cumulative density function of this distribution.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>prob</strong> (<em>ArrayLike</em>) – The point or points at which to evaluate the inverse cumulative
density function of this distribution. If a numerical value is
provided, a numerical value is returned. If a NumPy array of values
is provided, then a NumPy array of values will be returned that
matches the shape of <cite>prob</cite>.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>ArrayLike</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo.png" alt="Logo"/>
</a></p>
<h1 class="logo"><a href="index.html">Tyche</a></h1>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="language.html">tyche.language</a></li>
<li class="toctree-l1"><a class="reference internal" href="individuals.html">tyche.individuals</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">tyche.distributions</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.TycheDistributionsException">TycheDistributionsException</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.ProbDist">ProbDist</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.ContinuousProbDist">ContinuousProbDist</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.LinearTransformContinuousProbDist">LinearTransformContinuousProbDist</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.TruncatedContinuousProbDist">TruncatedContinuousProbDist</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.UniformDist">UniformDist</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tyche.distributions.NormalDist">NormalDist</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="probability.html">tyche.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">tyche.references</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="individuals.html" title="previous chapter">tyche.individuals</a></li>
<li>Next: <a href="probability.html" title="next chapter">tyche.probability</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2023, Padraig Lamont, drtnf.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.1.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
|
<a href="_sources/distributions.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>