Continue verdelingen

Inleiding tot statistiek in Python

Maggie Matsui

Content Developer, DataCamp

Wachten op de bus

tijdslijn van 1 tot 2 uur met 6 busaankomsten, elke 12 min

Inleiding tot statistiek in Python

Continue uniforme verdeling

Assenstelsel met wachtijd op de x-as

Inleiding tot statistiek in Python

Continue uniforme verdeling

Y-as wordt P(uitkomst = wachtijd) met een horizontale lijn op 1/12 over de grafiek

Inleiding tot statistiek in Python

Kans = oppervlakte

$$P(4 \le \text{wachtijd} \le 7) = ~~ ?$$

Oppervlakte tussen 4 en 7 gearceerd onder de horizontale lijn

Inleiding tot statistiek in Python

Kans = oppervlakte

$$P(4 \le \text{wachtijd} \le 7) = ~~ ?$$

Breedte gearceerd gebied is 7-4=3, hoogte is 1/12

Inleiding tot statistiek in Python

Kans = oppervlakte

$$P(4 \le \text{wachtijd} \le 7) = 3 \times 1/12 = 3/12$$

Breedte gearceerd gebied is 7-4=3, hoogte is 1/12

Inleiding tot statistiek in Python

Uniforme verdeling in Python

$$ P(\text{wachtijd} \le 7)$$

Oppervlakte gearceerd van 0 tot 7 onder horizontale lijn

from scipy.stats import uniform

uniform.cdf(7, 0, 12)
0.5833333
Inleiding tot statistiek in Python

“Groter dan”-kansen

$$ P(\text{wachtijd} \ge 7) = 1 - P(\text{wachtijd} \le 7)$$

Oppervlakte van 7 tot 12

from scipy.stats import uniform
1 - uniform.cdf(7, 0, 12)
0.4166667
Inleiding tot statistiek in Python

$$ P(4 \le \text{wachtijd} \le 7)$$

Oppervlakte van 4 tot 7

Inleiding tot statistiek in Python

$$ P(4 \le \text{wachtijd} \le 7)$$

Oppervlakte van 0 tot 7

Inleiding tot statistiek in Python

$$ P(4 \le \text{wachtijd} \le 7)$$

Gebied 0–4 licht gearceerd, 4–7 donkerder

from scipy.stats import uniform
uniform.cdf(7, 0, 12) - uniform.cdf(4, 0, 12)
0.25
Inleiding tot statistiek in Python

Totale oppervlakte = 1

$$P(0 \le \text{wachtijd} \le 12) = ~~ ?$$

Breedte van verdeling = 1, hoogte = 1/12

Inleiding tot statistiek in Python

Totale oppervlakte = 1

$$P(0 \le \text{uitkomst} \le 12) = 12 \times 1/12 = 1$$

Breedte van verdeling = 1, hoogte = 1/12

Inleiding tot statistiek in Python

Willekeur genereren volgens uniforme verdeling

from scipy.stats import uniform
uniform.rvs(0, 5, size=10)
array([1.89740094, 4.70673196, 0.33224683, 1.0137103 , 2.31641255,
       3.49969897, 0.29688598, 0.92057234, 4.71086658, 1.56815855])
Inleiding tot statistiek in Python

Andere continue verdelingen

 

Verdeling met 2 pieken

 

Klokvormige verdeling

Inleiding tot statistiek in Python

Andere continue verdelingen

 

Gearceerde oppervlakte onder kromme met tekst: oppervlakte = 1

 

Gearceerde oppervlakte onder klokvorm met tekst: oppervlakte = 1

Inleiding tot statistiek in Python

Andere speciale verdelingen

Normale verdeling

Plot van normale verdeling

Exponentiële verdeling

Plot van exponentiële verdeling

Inleiding tot statistiek in Python

Laten we oefenen!

Inleiding tot statistiek in Python

Preparing Video For Download...