310 likes | 467 Views
Probabilities. Probabilities. Basic concepts : Random experiment : All possible outcomes have to be known in advance The result of a particular experimen tcannot be predicted ( randomness ). The experiment can be repeated under identical conditions Sample space Ω :
E N D
Probabilities • Basic concepts: • Random experiment: • All possibleoutcomeshavetobeknown in advance • The resultof a particularexperimen tcannotbepredicted (randomness). • The experimentcanberepeatedunderidenticalconditions • Sample spaceΩ: • Set of all possibleoutcomes • Events • A sub-set ofthe sample space, i.e. a setofpossibleotucomes • Singular event: • A sub-set ofthe sample spacewithoneelement
Probabilitymodel • Set S ofpossibleoutcomes • Throwthecoin, S = (pitch, toss) • Throwthedice, S = (1, 2, 3, 4, 5, 6) • ProbabilitesPi • Throwthecoin, S = (pitch, toss)P(pitch) = P(toss) = 1/2 • Throwthedice, S = (1, 2, 3, 4, 5, 6)P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6
W2 1 2 3 4 5 6 W1 1 1/6 2 1/6 3 1/6 Model 4 1/6 5 1/6 6 1/6 1/6 1/6 1/6 1/6 1/6 1/6 Probabilities • Dice 1, 2, 3, 4, 5, 6 • P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6 • Twodicearethrown 1/36
W2 1 2 3 4 5 6 W1 1 1/6 2 1/6 3 1/6 Model 4 1/6 5 1/6 6 1/6 1/6 1/6 1/6 1/6 1/6 1/6 Probabilities • P(bothdiceshow 1) = P(1) P(1) = 1/6 1/6 = 1/36
W2 1 2 3 4 5 6 W1 1 1/6 2 1/6 3 1/6 Model 4 1/6 5 1/6 6 1/6 1/6 1/6 1/6 1/6 1/6 1/6 Probabilities • Event E: get a „2“ and a „3“: P(E) = 2 P(2) P(3) = 2 1/6 1/6 = 1/18 Event F: firstdice a „2“, seconddice a „3“, P(F) = 1/6 1/6 = 1/36
W2 1 2 3 4 5 6 W1 1 1/6 2 1/6 3 1/6 Model 4 1/6 5 1/6 6 1/6 1/6 1/6 1/6 1/6 1/6 1/6 Probabilities • P(double) = P(double 1) + ... + P(double 6) = 6 1/36 = 1/6
W2 1 2 3 4 5 6 W1 1 1/6 2 1/6 3 1/6 Model 4 1/6 5 1/6 6 1/6 1/6 1/6 1/6 1/6 1/6 1/6 Probabilities • P(sumofbothdiceis 7) = 6 1/36 = 1/6
Probabilities • Twohunterstrytoshoot a fox. • Eachhunterstrikeswithprobability 1/3. • Whatistheprobability, thatthefoxsurvives? • Eachhunterdoes not strikewithprobability 2/3 • P(foxsurvives) = P(bothhunters do nostrike) = 2/3 ∙ 2/3 = 4/9
Probabilities Factorial, binomialcoefficientandbinomialdistribution
Factorial In R: factorial() Number of students Orderings Number of possible orderings 0! := 1 1! = 1 2! = 1∙2 = 2 2 (A, B) 3 (A, B, C) 3! = 1∙2 ∙3 = 6 n! = 1∙2 ∙3 ∙ ∙n n Probabilities Factorial: • A numberofstudentsiscalledtotheblackboard. Howmanyorderingsarepossible? 1 (A) A 1 AB; BA 2 CAB; CBA;ACB; BCA;ABC; BAC 3 ∙2 = 6 n ∙(n-1) ∙∙2 ∙1
6 numbers: Final solutionofquestionabove: Probabilities • Binomialcoefficient Choose 6 numbers out of 49. HowmanyoutcomesarethereiftheorderingdoesNOT matter andifnumberscanbeselectedonlyonce? First number: 49 choices Second number: 48 choices First and 2nd number: 49 · 48 choices 49 · 48 · 47 · 46 · 45 · 44 choices Isthisthesolution? No! – Why? 1. selection: {7; 18; 5; 43; 1; 22} 2. selection: {18; 7; 5; 43; 1; 22} Both selections are equal,since they differ only with respect to the order How many orderings are there? 6!
Claim: Definition: isthenumberofways k thingscanbechosenfrom n things. Here, theorderingofthe k thingsis not ofinterestandeachelementcanbechosenonlyonce. Probabilities Binomialcoefficient(In R: choose(n,k))
Phenotype: affected unaffected S: Probabilities • Binomialcoefficient Inheritance (PKU) PKU is autosomal reccesive hereditary disease. Pedigree: m: mutant allelew: wildtype allel (= „normal“ allele)
S: ? Probabilities • Binomialdistribution P(childisill)= 1/2 ∙ 1/2 =1/4 P(childis not ill)= 1- P(childisill)= 3/4
S: S: ? ? Probabilities • Binomialdistribution P(firstchildill, 2nd child not ill) = 1/4 ∙ 3/4 =3/16 P(onechildill, onechild not ill) = 2 ∙ 1/4 ∙ 3/4 =6/16
ill ill healthy healthy orderings healthy ? ? ? ? ? S: An experimentwithtwo (->“binomial“) possibleoutcomes („success“ and „failure“) isindependentlyrepeated n times p: probabilityofevent 1 („success“) per experimentn: numberofexperimentsk: numberofsuccesses Binomialdistribution(In R: dbinom(k,n,p) ): Probabilities
? ? ? ? ? Densityfunction S: Probabilities • Binomialdistribution p = 1/4 (affected) (1-p) = 3/4 (not affected)
Densityfunction Probabilities • Binomialdistribution
functionX Probability model Real numbers S R x 1 y 2 z 3 ? 4 5 Probability P Probabilities • Random variable X: Random variable
S Probabilities • Random variable: function X thatassigns a real numberto an event Examples for possible random variables X, Y X: number of edges 3 4 0 Y: red 1brown 2 1 2
S Question: P(X = 3) = ? correct: P( aS | X(a) = 3) = Probabilities • Random variable X: number of edges (sloppy) Usethesloppynotation!
S X: Number of edges 1 2 1 2 Density Distribution function Probabilities P(X < 0) = P(X = 0) = P(X 0) = P(X = 2) = P(X 2) = P(X = 3) = P(X 3) = P(X = 4) = P(X 4) = P(X = 5) = P(X 5) = Distribution function: F(a) = P(X a)
Example xi pi 0 2/5 Mean 3 1/4 4 7/20 Empircalvariance Emp. standarddeviation Standard deviation Probabilities • Statistical measures Sample Model Expectation Variance
Expectation: Variance: Standard deviation: Probabilities • Binomialdistribution
0° n possibilities with P=1/n Probabilities • Continuousrandom variable Random variable W: angle P: all angles equally likely P(W = 180°) = ? precision: 1° 360 possibilities with P=1/360 precision: 0.1° 3600 possibilities withP=1/3600 precision: 0.01° 36000 possibilities with P=1/36000 P(W = 180°) = 0
0° F 1 0.8 0.6 0.4 0.2 0 X 0 90 180 270 360 Probabilities • Continuousrandom variable Distribution function: F(a) = P(W a) F(0) = P(W 0°) = F(90) = P(W 90°) = F(180) = P(W 180°) = F(270) = P(W 270°) = F(360) = P(W 360°) =
Distribution function F 1 F 1 0.8 Density function f f 0.6 0.4 0.2 0 X X 0 0 90 90 180 180 270 270 360 360 Probabilities • Continuousrandom variable
Probabilities • Random variable discrete continuous Expectation Variance
Density function f f X 0 90 180 270 360 Probabilities • Random variable Expectation? Conjecture: 180