PROBABILITY I STAT 394
Popular in Course
Popular in Statistics
This 21 page Class Notes was uploaded by Providenci Mosciski Sr. on Wednesday September 9, 2015. The Class Notes belongs to STAT 394 at University of Washington taught by Elizabeth Thompson in Fall. Since its upload, it has received 23 views. For similar materials see /class/192500/stat-394-university-of-washington in Statistics at University of Washington.
Reviews for PROBABILITY I
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/09/15
Lecture 9 Discrete random variables Ross 4142 There are no notes for lectures 78 108 1010 91 De nitions and examples i De nition A random variable X is a real valued function on the sample space ii Example the number of heads in 10 tosses of a fair coin iii Example the number of children of blood type A out of n from marriages of AB x 0 parents iv Example the number of red pea plants out of n from crosses of RW x RW pea plants v Example the number of red sh in sampling k sh without replacement from a pond in which there are N sh of which n are red vi Example the number of traf c accidents in a large city in a year 92 Discrete Random variables i De nition A random variable X is discrete if it can take only a discrete set of values ii Example ii above X takes a value in X 0123456789 10 iii Example iii above X takes a value in X 0 12 v Example v above X takes values in X max0 k n 7 N maxk vi Example vi above X takes values in X 0 1 2 0 U Z1 93 Probability mass function iv Example iv above ditto i De nition The probability mass function pmf of a discrete random variable X is the set of probabil ities PX z for each of the values z E X that X can take 10 ii Example ii PX a 1210 for z 01210 in Example m PX a 12 for z 0 1 2 iv Example iv PX a 34w14nrw for z 0 12 v Example v PX z Z j for z max0kn7Nmaxkn vi Example vi PX z exp7mml for x01234 94 Properties of probability mass functions i PX z 2 0 for each x E X In fact for discrete random variables we can require PX z gt 0 for each x E X ii ZEPX z 1 where the sum is over all z E X 95 Names of some standard probability mass functions i Binomial Examples ii iii and iv are Binomial random variables with parameter 12 12 and 34 respectively ii Bernoulli If n 1 examples iii and iv are Bernoulli random variables iii Multinomial If there are more that two types for example number of each of types A B AB and O in sample size n from a population then we have a Multinomial random variable iv Hypergeometric ln example v X is a Hypergeometric random variable v Poisson ln example vi X is a Poisson random variable with parameter Lecture 10 Continuous random variables Ross 51 101 De nitions and examples i De nition A continuous random variable X is one that takes values in foo 00 That is in principle some values may be impossible ii Example A random number between a and 1 values in the interval a 1 iii Example The waiting time until the bus arrives values in 0 00 iv Example The height of an individual relative to the population average values in foo 00 in principle 102 The probability density function de nition and basic properties i De nition The probability density function pdf of a continuous random variable X is a non negative function 1 de ned for all values z in foo 00 such that for any subset B for which X E B is an event PX e B fz dz B ii In fact events can be made up of unions and intersections of intervals of the form a b b PaltX b fmdm 1 iii Note the value at the boundary does not matter I PXa fmdz 0 I for any continuous random variable iv Note fz 0 is possible for some m Values see the pmf For example if X 2 0 as in the waiting time example fz 0 if z lt 0 V X takes some value in foo 00 so 00 l P7ooltXltoo 700 103 Examples of the probability density function i In general any non negative real valued function f on the real line auch that 30 fz dz 1 ii Example ii above Uniform pdf l fz b for a g x g b and fz 0 otherwise 7 a iii Example iii above Exponential pdf with rate parameter A fz exp7zform20and fz 0ifzlt0 iv Example iv above Normalpdf with parameters u and 02 i W i l x f fmi exp 7 oriooltmltoo Lecture 23 The Normal distribution There is no lecture 22 Nov 12 was Midterm 2 231 Standardizing random variables Recall EaY b aEY b varaY b azvarY Suppose Y is a discrete or continuous random variable with EY a and varY 02 Let Z Y 7 aa Then EZ 7 aa a 7 aa O and varY 1azvarY 0202 1 232 Location and scale parameters A location parameter a shifts a probability density the pdf is a function of m 7 a For example we can shift a uniform U0 1 pdf to a uniform Ua a 1 pdf A scale parameter stretches or shrinks a probability density For example to transform a Uniform U0 1 density to a Uniform Ua b we shift by a and scale by b 7 a Another example of a scale parameter is the rate parameter of an exponential random variable If we measure waiting times in minutes instead of hours we still have an exponential shape to the pdf but the rate per minute is 60 times less than the rate per hour 233 The Normal probability density parameters a and 02 Na 02 1 7 2 fX7 Wexpi 7ooltmltoo 1 m7 2 839 PX6Bm B Wexpd Let 2 z7pU dzdza BZ x7laam 6 BE 1 22 PZX7aLT BZ B Wexp7adz N 1 22 Cquot Bz exp7j dz of That is fzz is a Normal probability density with parameters 0 and 1 Also a is a location parameter a is a scale parameter 139 o Above Normal pdfs at different scales values of a N 039 39 Left Normal pdfs at different lo 7 cations values of a O 7 l l l l l l 0 2 4 6 8 10 234 The standard Normal probability density A random variable Z with pdf fzz exp7z722 on 700 lt z lt 00 is a standard Normal random variable EZ 30 2fzzdz 0 since fZ7z fzz So varZ EZ2 50 22fZzdz 1 see Ross P 219 for details Now Z X 7 aa or X a aZ so for the general Normal Na 02 random variable with parameters a and 02 EX a and varX 02 Lecture 24 Normal approximation to the Binomial 241 Stirling7s formula For large n n is approximately n e Let k np then 71 m 71 lt k l kn7k mp1n17p1 nne 27139 WWW 2wltnlt17pgtgtnlttpgt e7nltl7pgtm MB 1 1 1 mansion 7pgtgtnlt1wgt m m nplt1 7p Wlt1 729111711 242 Standardizing the binomial probabilities Suppose X has the Binomial Binnp pmf Then EX np varX np17p So if Z X 7 npnp1 719 then EZ O varZ 1 243 The DeMoivreLaplace limit theorem a For a Binnp random variable X the pmf is largest at k z np PX k n pk17 p k So for 71 large and k 71p we have 1 1 1 m 17 1 1 V 27139 npl 7 p p pl 7 p 1 p p p x 27139 npl 7 p But this is also the value of the maximum pdf of a Normal random variable with mean u 71p and variance 0 nplt17 p b As X increases from k to k 1 Z X 7 np np17p increases from 2 to z 6 Where 2 k 7 npnp17p and 6 1xnp17p Note np17 p 162 For a Normal N01 pdf 117 PX 71p fzz6 7 expPWMVD 7 ex 72 7 2 N 7 2 1022 7 78 ka 7 p 6 62 1 5 77 k117 n7k71 61311 PXk1 7 M1 p 7 n7kgtltigt PX n k 1 17 lt ltkgtpklt1ipgtn7k 1 p ltn1p 25 L 7 np1pZp6 1762p npZ51 17p np1p1pZ5 1719 1521p z 1762p176217p 1762p76217p 1762 244 A preview of the Central Limit Theorem Recall that Binnp is sum of n independent Bernoulli each with mean p and variance p1 7 p Suppose Y1 Yn are independent with the same distribution each with mean u and variance 02 Tn 2i 1 Yi Then EXT 7111 and varTn n02 Tn 7 a has mean 0 and variance 1 and Subject to some conditions the same result holds for Tn as for the Binnp That is Tn has approx a N0 1 pdf This is the Central Limit Theorem Lecture 1 Sample spaces and events Ross section 22 11 Sample spaces The sample space 9 is the set of all possible outcomes of an experiment One and only one outcome can occur 12 Examples i Child is boy or girl 9 boy girl ii Toss of one die 9 123456 iii Number of tra ic accidents 9 0 1234 O U 3 iv Time waiting for the bus 9 0 oo 89 the positive half line 13 Events Any subset E of S2 is a event The book says this it is OK for countable sample spaces but an oversimpli cation for a space like 99 14 Combining events i If E is an event not E the complement of E written EC is an event ii If E is an event and F is an event then E andor F is an event E andor F is written E U F iii If E1 E2 are events then E1 U E2 U E3 is an event Countable unions iv If E is an event and F is an event then E and F is an event E and F is written E O F v If E1 E2 are events then E1 1 E2 1 E3 is an event Countable intersections 15 More events i The empty set ltIgt is an event so 9 ltIgt is an event If E O F ltIgt E and F are disjoint also known as mutually exclusive ii E and E0 are disjoint events E U E0 2 E O E0 ltIgt iii Events E1 E2 are mutually exclusive if E2 1 E7 ltIgt for all pairs ij ij 1 k i 7 9 iv Events E1 E2 are exhaustive if E1 U E2 U U Ek 2 v If 9 is discrete the elements of 9 are a set of mutually exclusive and exhaustive events 16 A genetic example The ABO blood types We can be blood type A B AB or 0 Let our experiment be nding the blood types of two children in a family Then 9 ijij ABABO Let E1 be the rst child is type A Let E2 be the rst child is type 0 Let E3 be the second child is type B Let E4 be at least one child is type A Let E5 be at most one child is type A Let E5 be the two children have the same blood type Let E7 be the two children have different blood types Which pairs of events are complements Which pairs of events are disjoint Which pair of events is mutually exclusive and exhaustive What is the intersection of E4 and E5 Lecture 2 Probabilities Ross sections 23 24 21 Probability axioms For each event E we assume we can assign a number PE which satis es the following three axioms i PE 2 O for every event E ii PSl 1 iii If E1E2 are mutually exclusive PE1 U E2 U E3 U PE1 PE2 PE3 Note for a countable sample space each outcome element of S2 has a probability and each even is a union of outcomes with probability the sum of the probabilities of the outcomes 22 Probability interpretation as a limiting frequency A useful interpretation of PE is that it is the proportion of times an outcome in E occurs in a large number of repetitions of the same experiment with outcomes in the sample space fl Example Sampling an individual from a very large population 9 A BABO PA can be interpreted as the proportion of A blood type individuals in the population If we repeat the sampling of an individual again and again the proption of times we observe the individual to have blood type A is PA For the USA population roughly PA 036 PB 020 PAB 008 and PO 036 Pantigen A on red blood cells PA U AB PA PAB 044 for this example 23 Basic probability formulae i 9 E UEC E Ec ltIgt so PE PE PSl 1 or PE 17 This also shows PE S 1 since all probabilities are non negative ii E UF E U E0 OF so PE UF PE PE OF So PEUF PE F PE PEC F PE F PE PF or PE U F PE PF 7 PE 24 Two important probability formulae i Law of total probability Suppose E1 E2 form a partition of S2 That is E1 E2 are mutually exclusive and exhaustive That is E2 1 E7 ltIgt disjoint and S2 E1 UE2 U Then for any event F F Ui F 1 E2 PF Z PF Ei Special case if E is ith outcome in a countable 2 F O EZ39 EZ39 or F EZ39 ltIgt and PF Eiep ii The inclusion and exclusion formula PDUE PDPE7PDOE PCUDUE PCPDPE7PCOD7PD E7PC EPC D E PE1UE2UUEk PE1PE2PEk 7PE1 1 E2 7 all the other 2 way PE1 1 E2 1 E3 all the other 3 way 7PE1 1 E2 1 E3 1 E4 7 all the other 4 way i PE1 n E2 n n Ek Lecture 3 Permutations and combinations Ross sections 1114 31 Basic principle of counting If an experiment has k steps and if earlier choices do NOT limit later ones then if step 1 can be done in n1 ways step 2 in in ways stepk in nk ways then there are n1 X in X gtlt nk possible outcomes for step 1 step k Corollary There are 2 subsets of a set size k Proof Each element i i 1 k can be chosen or not in 2 i 1 k So total possible is 2 X 2 X X 2 2k Note for proper not fl non empty not ltIgt subsets there are 2 7 2 32 Permutations and combinations i The number of ways of ordering n distinct objects is nn 7 1n 7 2321 n1 ii factorial ii The number of ways of choosing k distinct objects in order from n is nn71n7 k 1 nIn7kl iii If we do not care about the order in which the k objects are selected there are kl selections that give the same combination That is there are 7 klkl distinct combinations this is often written Ck or Z iv Ross Section 14 Example 4b R7 Note this is an example where is is easient to consider the complement of the event v Ross Section 14 P8 Equation 41 n n 7 1 n 7 1 lt k gt lt k 1 gt lt k gt Consider the number of choices that do and do not contain the particular object 1 33 Multinomial combinations Number of ways of arranging n1 objects type1 n2 objects type2 nk objects type k where m 712 71c n Choose the n1 positions for type 1 n nIn11n 7 n1I n1 Now out of the remaining n 7 n1 positions choose n2 for type 2 number of ways n 7 n1 n 7 n1In21n 7 n1 7 n2l etc n2 Total number of ways is 711 717711 7177117712 n7n17n277nk11 n1 n11n7n11n21n7n17n21 713171771177127713 7119101 7 n1 7121nkl Example Twelve students go to donate blood 5 are type A 2 are type B one is AB and 4 are type 0 How many different orderings of the types of blood in the 12 blood donation tubes are there Answer 12151 gtlt 2Igtlt11gtlt4I 12111098762432 121110937 914760 Lecture 11 Computing probabilities for random variables 111 Three discrete examples i In one experiment Mendel selfed his pea plants that is the parents were RR x RR or RW x RW or WW x WW In order to tell whether the parents were RW x RW he grew up 10 offspring and if all were red he assumed the parents were RR x RR Recall that each offspring of an RW x RW mating is white with probability 14 For each RW x RW mating what is the probability Mendel mis called it as RR x RR ii In the formation of chromosomes that are copied from the parent to go to the sperm or egg cell or pollen or seed a process called crossing over occurs For a segment of chromosome of length L the number of crossovers has a Poisson distribution with parameter L a For a chromosome of length L 2 what is the probability of no crossovers b What is the probability of 2 or more crossovers For those interested a length L 1 corresponds to about 108 basepairs bp of DNA iii Bacteria have just one parent and genetically they are close copies of that parent If we take 2 bacteria from a current pool we can in theory trace back their parents generation after generation until we nd their most recent common ancestor Suppose that independently at each generation two bacteria have the same parent with probability p 002 a What is the probability that two randomly chosen bacteria have their most recent common ancestor exactly 3 generations ago b What is the probability the most recent common ancestor is at least 50 generations ago 112 Four examples of continuous distributions i Assume we have an ideal random number generator that can generate a number uniformly distributed between 0 and 1 We generate two independent such random numbers a What is the probability the second number is bigger than the rst b What is the probability the rst number is between 03 and 07 event A c What is the probability the second number is either between 01 and 02 or between 07 and 08 event d What is the probability that both events A and B happen A EU a 1 The length of chromosome before a crossover event happens is exponential with parameter 1 a What is the probability that no crossover will occur in length of chromosome L 2 b What is the probability that the rst crossover occurs before length L 05 Compare 111 ii a and 112 ii a iii The length of time before two bacteria have a common ancestor is exponential with rate parameter 002 per unit time a What is the probability that two randomly sampled bacteria have a common ancestor more recent than 3 time units ago b What is the probability that the most recent common ancestor is at least 50 time units ago Compare 111 iii b and 112 iii Lecture 12 More Conditional probability Ross 35 121 Conditional probability is a probability 1 PD E PD 2 0 we assume PE gt 0 2 PQ E PQ 1 3 Note ClDi O E Ul Dl So7 for disjoint Di HuiD E PUiDi o EPE 21313 o EPE ZPD E i 139 So conditional probabilities satisfy all the probability laws For example7 PCU D l E PClE PDE 7 PC D l E D1 CD2 PD1 PD2 122 Updating information i Bayes7 Theorem again see lecture notes 53 Assume PD and PH are both gt O Then7 by de nition7 PD H PH PD H PH D PD or PH D PD H PH PD Note also7 from the law of total probability PD PD H PDmH0 PD1HPH PD HC17PH ii Mutually exclusive and exhaustive events H hypotheses 7 or states of nature Suppose H has probability and 21 1 k PH1 l D PD l H1PH1 END 1 HPHjgt j1 123 Updating information sequentially i The probability of new data Ross Ch 37 simpler version of example 5e Suppose again that D and E are independent given each Hi PE D 271PE l D Example two coins 01 and Cg with probability head 14 and 34 Choose one coin randomly and toss it twice What is the probability the second toss is heads given the rst is heads Solution 1 P2 nd head 1 rst head Pboth headsP1 st head 11 x 11 x 12 1 31 x 31 x 1211 x 12 1 31 x 12 38 Solution 2 After rst head7 PC391 PC391 head 14 x 1214 x 12 34 x 12 14 So 13302 PC2 head 17 14 34 Pheads again PC391PheadC391 PC392Phead Cg 14 x 14 34 x 34 58 ii The general case Ross7 Ch 3 example 5f Suppose now we have two data events D and E PHl D o E PD o E HiPHl PD o E HjPHjgt 391 u Also7 provided D and E are independent given each Hi i 17 k PH1DCE PElHPH1D 1309 l HjPH l 13 H x Q That is7 we can rst update from to PHl D and then use these probabilities in updating to PHi D O And then so also for the next event7 and the next7 Lecture 13 Additional bits on Conditional Probability and Independence 131 Independence of multiple events Ross 34 i Pairwise independence reminder Recall E and F are independent if PE O F PE X Then PE F E PE o FPF PE and PF E E PE o FPE PF Recall that if E and F are independent so are E and F0 EC and F and EC and F0 ii Joint independence E1 E2 En are jointly independent if for every subset E71E72 with r1 lt r2 lt g n PET1 ET2 rk PE71gtlt PEn X X PErk iii Pairwise independence without joint independence example Two independent rolls of a fair die D1 is rst throw gives odd number D2 is second throw gives odd number D3 is sum of two throws is odd number PDl PDz PDg 12 PD1 D2 PD1 D3 PD2 D3 14 But PDl Dg Dg 0 not 18 These three events are pairwise independent but NOT jointly independent iv The three way independence without pairwise is clearly also possible Let F G I be Swiss adults uent in French German and Italian Suppose PF PG PI 12 and PF G I PF X PG X PI 18 I 0 But this does not determine PF O C etc F F0 F F0 For example we could have as shown Then C 18 0 14 18 12 PF G 38 PF I 18PG 118 G0 0 38 18 0 12 18 38 38 18 132 Conditional dependence for random variables i Conditioning a discrete random variable Recall PX z is just an event and PX E B ZRB PX So ifX is Bin1005 PX even 12 and PX x l X even 2PX z ifz is even 0 otherwise le is Poisson parameter 1 PX 2 2 17 5 1 7 5 1 and PX x l X 2 2 e lml1 7 25 1 ii Conditioning a continuous random variable Recall X E B is an event and PX E B EmeBPX So PX e CX e B PX e B o CPX e B ENC fzdz B fzdz 133 Examples of conditioning a continuous random variable i Example of a Uniform random variable Suppose X has pdf fz 1 0 g x g 1 PX gt 06 l X g 08 P06 lt X 08PX 08 0208 025 ii Example for an exponential random variable Suppose X has pdf fz 055 05m on 0 lt z lt oo ffmdz 7 5 05 So PX 61X gt 2 P2 lt X 6PX gt 2 51 7 5 3e 1 175 x 67 iii The forgetting property of the exponential Suppose X has pdf fz exp7z 0 lt z lt 00 Consider PX gt a b l X gt a PX gt a bPX gt a exp7a bexp7a exp7b PX gt b Lecture 14 Examples of independence and conditioning 141 Independent inheritance of characteristics no genetic linkage To nd the ower color of offspring pea plants Mendel had to grow them Things he could observe in the seeds were much easier to study Unfortunately he found that the DNA determining these characters is inherited independently of the DNA determining ower color One such character is seed coat color green G or yellow Plants that are CC or GY have green seeds ones that are YY have yellow seeds i Mendel crossed two red owered pea plants whose parents were a red owered plant and a white owered plant What is the proportion of red owered offspring and of white ii Mendel crossed two green seed pea plants whose parents were a green seed plant and a yellow seed plant What is the proportion of green seed offspring and of yellow iii Mendel crossed two red owered green seed pea plants whose parents were red oweredgreen seed and white oweredyellow seed In the offspring what is the proportion of red green red yellow whitegreen and whiteyellow iv Mendel crossed two red owered green seed pea plants whose parents were red oweredyellow seed and white oweredgreen seed In the offspring what is the proportion of red green red yellow white green and whiteyellow 142 Approximating discrete random variables i Back to the bacteria or cells of lecture 11 Let T be time continuous or number of generations continuous back to to common ancestor Model 1 At each generation back two bacteria share a parent with probability p 002 independently at each generation Model 2 The time back to a common ancestor is exponential with rate parameter 002 a Under model 1 what is PT gt 50 7 b Under model 2 what is PT gt 50 7 ii Repeat i for p 0001 and PT gt 1000 for model 1 and model 2 143 Conditioning continuous random variables i Using model 2 of 142 i nd PT gt 60 l T gt 10 What about PT gt 550 l T gt 500 ii Using the unrealistic model that T has a pdf uniform on 0100 nd PT 25 l T g 50 Compare this with PT 25 iii Using model 2 of 142 i nd PT 25 l T g 50 Compare this with PT 25 Lecture 15 Mean and variance of random variables Ross 43 457 52 151 Expected value of a random variable the mean i Discrete case Ross7 43 If X is discrete with pmf PX z pz gt 0 for z E X the expected value of X denoted EX is EX EweY z Mm7 provided this sum exists and is nite ii Continuous case Ross 52 If X is continuous with pdf m7 fz 2 0 for 700 lt z lt 00 the expected value of X denoted EX is EX 50 zfm dm provided this integral exists and is nite Note fz dz z Pm lt X g z dz 152 Expected value of a function of a random variable i Discrete case Ross 44 Now if X takes values m the values taken by Y gX are gz7 but several xi may have the same PYy 2 pm SO 199121 E9X ZyPYy Zlty Z 29 Z Z 9mipmi ZQWMM y igmiy y igmiy i ii A simple property Ross7 Corollary 41 EaXb Zambpz a prm aEX b m The same result holds for continuous random variables iii A neat result for non negative random variables Ross 527 Lemma 21 EX Ajoy wdy Altm0dgtfydy Altyfydygtdm APXgtxdz iv Continuous case Ross 52 proposition 21 For a continuous random variable f1 gz fz dm We can prove this for a non negative gX7 using iii see Ross 52 for details 153 The variance of a random variable Ross 457 52 i De nition lf EX u varX EX 7 u2 Since m 7 u2 2 0 for every m the de nition shows varX 2 0 ii Property 1 using 152 ii we have varX EX 7 M EX2 7 2pX 2 EX2 7 2pEX p2 EX2 7 211 x u p2 EX2 7 p2 EX2 7 This is usually the easiest way to compute varX iii Property 2 using 152 ii we have varaX b EaX b 7 1117 b2 Ea2X 7 u2 a2EX 7 u2 azvarX 154 One example the mean and variance of a Poisson random variable PX z e AAmml The mean EX 200ze AAmzl 31 Ri em 54A 231 Am lm 71 54M Then EXX 71 23103435 7 1e 1x 54A 232 AHm 7 2 e AAZeA A2 So then varX EX2 7 EX2 EXX7 EX 7 EX2 A24 72 Lecture 25 Using the Normal Approximation Ross 54 Mendel7s experiments 251 Using the Normal probability table The table in Ross P222 is of the usual form for the probabilities for a N01 standard Normal distribution It gives PZ z for values of z from 0 up This probability is denoted For negative m PZ z PZ 2 7m 17 PZ 7x Note that since Z is a continuous random variable PZ lt z PZ For general a b Pa lt Z b ltIgtb 7 ltIgta 252 Mendel7s experiments Mendel did many experimants of the form of the one with the redwhite owers He crossed red owered plants with white owered plants so he knew the red owered offspring were of RW type These are known as the F1 or hybrids He then crossed these with each other and expected to get red and white owers in the ratio 31 Here are four examples a 253 F1 producing 7324 seeds 5474 round 1850 wrinkled ratio 2961 b 258 F1 producing 8023 seeds 6022 yellow 2001 green ratio 3011 c 929 F2 705 red owers 224 white owers ratio 3151 d 580 F2 428 green pods 152 yellow pods ratio 2821 253 Are Mendel7s results too good There has been much debate as to whether Mendel s results are too good 7 too close to the 31 ratio Note the larger samples for characteristics that can be observed at the seed stage These give the ratios closest to 31 This is as expected varX np17 p but varXn varXn2 p1 7pn which decreases as 71 increases Are we too close Recall Z X 7 is approx N01 Here p 34 a Z 547477324x075m 705127 P705127 lt Z 05127 2ltIgt0512771 039 b Zb 602278023x075m 01225 P701225 lt Z 01225 2ltIgt0122571 0097 c Z0 7057929 x075m 06251 P706251lt Z 006251 2ltIgt0625171 0468 d Zd 4287580 x 075m 706712 P706712 lt Z 06712 2ltIgt0671271 0498 So far with these experiments there seems no reason to think Mendel s results are too good 254 Combining the experiments The fact that these involve different characteristics does not stop us combining them They are all independent Bernoulli trials with p 075 We have 7324 8023 929 580 16856 trials with 5474 6022 705 428 12629 successes Z 12629 716856 x 075m 702312 P702312 lt Z 02312 2ltIgt02312 71 0183 Alternatively we can combine the Z values we could do this even if they came from Bernoulli trials with different p Here Z Z5 Z0 Zd 705127 01225 062517 06712 7 04363 This would be a Normal with mean 0 but variance 4 why So we must standardize it Z 7043632 702182 P702182 lt Z 02182 2ltIgt02182 71 0173 So again either way here there is no evidence of the results being too good However when a large number of Mendel s other results are also grouped together overall they do look a bit too good Lecture 26 More examples from Mendel7s experiments 261 Approximating discrete Binomial with continuous Normal a When approximating PX k for a binomial X by a Normal Y strictly we should consider Pk 7 lt Y k 12 see homework example b However for large n it makes almost no difference Recall when X is increased by 1 Z is increased by 6 1m c Example suppose X is Btn3023 EX 20 varX 30 x 13 x 23 203 Compute the probability 14 g X g 18 i Exactly using the Binomial probabilities Z Z14PX Answer 02689 ii Using the Normal approx with the range 14 to 18 for X Z 14 7 20W 7232 to Z 187 20W 7077 Answer 02105 iii Using the Normal approx with the range 135 to 185 for X Z 135 7 20W 72517 to Z 185 7 20W 705809 Answer 02747 262 Mendel7s experiment continued Now Mendel wanted to show not just the 31 redwhite ratio but also the 121 for BB RW WW So he needed to nd which of his red owered F2 plants were RR and which were RW To do this he selfed his red owered F2 pea plants that is the parents were RR giVing RR x RR or RW giVing RW x RW In order to tell whether the parent was RW Mendel grew up 10 offspring and if all were red he said the plant bred true Note under Mendel s hypothesis PRR 1 red 13 Mendel reported his result from 600 F2 he found 201 bred true Assuming 13 should breed true is this result too close to 13 Note ifp 13 EX 200 varX 600 x13 x 23 4003 i Without the correction considering X 199200201 show the probability of being this close is about 65 Z i008660 ii With the correction 1895 lt X lt 2015 show the probability of being this close is a bit over 10 Z i012990 Here the continuity correction makes enough difference that is might affect our belief about whether Mendel s results are too good 263 Mendel7s mistake Recall that each offspring of an RW x RW mating is white with probability 14 i For each RW x RW mating what is the probability Mendel mis called it as RR x RR Answer 3410 00563 ii If the frequency of RR parents is 13 and RW is 23 what is the overall probability that all 10 offspring plants are red Answer 13 23 x 00563 0371 264 Probability of being close to 0371 So now the p of Mendel s Binomial should have been p 0371 EX 2226 varX 14001 stdeV 1183 Now we need the probability that Mendel s reported count of 201 would be this far o i With no correction X g 201 Z lt 71825 or Z gt 1825 Answer about 68 ii With correction X 2015 Z lt 71783 or Z gt 1783 Answer about 74 iii Or maybe we should ask this far off in direction of his assumed 13 Asnwers 34 and 37 Either Mendel was for once quite unlucky or else his result is too close to what he may have expected and too far from what he should have found Lecture 27 The Cumulative Distribution Function Ross 49 52 271 De nition Ross 41 For any random variable X the cumulatiue distribution function is de ned as PX z for foo lt z lt 00 ii For a discrete random variable with pmf pXz FXb Emgbpxx iii For a continuous random variable with pdf fXz FXb fix fXmdz iv For all random variables Pa lt X g b Fb 7 Fa because X g b X g a U a lt X g b and X g a O a lt X g b I empty set 272 Properties Ross 49 i FX is a non decreasing function if a lt b then FXa FXb because X g a C a lt X g 1 ii limlH00 FXb 1 because for any increasing sequence 1 a 00 n 1 23 Q X lt 00 oX bn so 1 PQ limnnoo PX b limnnoo FXb iii limbn x FXb 0 because for any decreasing sequence 1 a foo n 1 2 3 I X foo X g bn so 0 PltIgt liniyH00 PX g 1 liniyH00 iv FX is right continuous That is for any I and any decreasing sequence 1 n 1 2 3 with bn a b as n a 00 limH00 FXbn FXb because X g b O X bn Note PX g b PX lt b PX b and PX lt b limmabi If X is discrete with PX b gt 0 FX will be discontinuous at z b 273 Case of continuous random variables Ross 52 For discrete random variables is just a set of at constant pieces with jumps in amount PX at each possible value x of X This is not very useful For continuous random variables the cdf is very useful Fxm PX z fXwdw so W ms 00 That is we get the pdf by differentiating the cdf the cdf is often easier to consider Example scaling an exponential random variable Suppose fXm Ae M on x 2 O and let Y aX a gt 0 What is the pdf of Y First Fm f Ae Awdw 754 175 oanO 0 NowFyygt PX21 PltaXYgt PX ya FXltyagt 176W so My F y d lie Ay U Aae y onyZO 24 That is Y is an exponential random variable with parameter a 274 Using the cdf to consider functions of random variables Using the cdf is often the easiest way to consider functions of a random variable Example Suppose X is Uniform UO1 What is the pdf of Y X3 1 0 z 1 z nggl Fifty 130 S y PX3 S y PX S if Fxy13 24137 0 S y S 1 My lmy 13y 230y1 Note EX3 Alias 14 EY 01y13y 23dy 1994343M3J 14 Lecture 19 More expectations Summing independent random variables The general case is in Ross Chapter 7 Here we take the simplest case of two discrete random variables7 but the results are true in general 191 Independent random variables Let X and Y be two discrete random variables de ned on the same sample space eg Q is outcomes of tosses of two dice X is the sum of the two values7 Y is the maximum of the two values Suppose X takes values m i 17 27 and Y takes values yj j123 Let PX i W Y yj pij Note Ejpij 1 Also PX mi EjPX xi O Y yj Ejpij and PY yj EiPX xi O Y yj Zip Also note that events of interest are of the form X x O Y yj alll other statements about X and Y derive from these De nition Random variables X and Y are independent if PX x O Y 24739 PX m x PY 24739 for all i and j 192 Expectation of the sum Note this does not require independence The set of possible values of X Y is the set of all z yj for all i and j EXY ZZWHWWW M W Y 97 29679 21779 7 7 l 7 l 7 2W 2PM 297 2PM 290713 9 2247130 247 i 739 739 i i 739 EX EY Expectation of sum is sum of expectations always 193 Expectation of the product independence case In general 27 xiyjPX l W Y yj 27 l y7 pi7 If X and Y are independent then ZZiyjpij 139 739 22951117ij QEDPO 247 23513 35 Zyjpo 347 EXEY 7 7 194 Variance of the sum independence case varX Y EX Y2 7 EX Y2 EX Y2 EX2 2XY W EX2 2EXY EY2 EX Y2 EX EY2 EX2 2EXEY ECDZ varX Y varX 2EXY 7 VarY le and Y are independent7 EXY Then varX Y varX varY For independent random variables the variance of the sum is the sum of the variances Note 1 If we can sum 27 we can sum any nite number X Y Z X Y Z Note 2 The converse of 1937 194 is NOT true We can have EXY EXEY7 but X and Y NOT independent Lecture 20 Examples of computing expectations 201 An example of variance of sum o g a What are EX EY EXY 7 g b Are X and Y independent c What are varX varX Y and varX2 Y2 7 m I 3 I 1 0 0 5 010 0 5 1 0 X 05423 03187 09398 08532 01241 06984 09950 0 Y 08402 09478 03418 05215 09923 07157 00998 0 XY 04556 03021 03212 04450 01231 04998 00993 0 X2 02941 01016 08832 07279 00154 04878 09900 35 X2 Y2 10 10 10 10 10 10 10 70 prob 17 17 17 17 17 17 17 1 202 Example of expectations for a continuous random variable Suppose X is a Uniform 01 random variable x 1 0 g x g 1 a What are EX EX2 and EX 7 b What is varX c Now suppose Y is a Uniform ab random variable fyy 1b 7 a on a g y g 1 Without doing any more integrals what are EY and varY 203 Using the Poisson approximation on the birthday problem77 We know that doing the exact calculation we need only 71 23 people before the probability that no two share a birthday is less than 12 a Find out whether the Poisson approximation for independent rare events given the same result 7 ie how large must n be before the probability of 0 sharing events is less than 12 b In our sample of 37 people we did not have any trios sharing a birthday How would you use the Poisson approximation and the assumption of approximately independent events to nd the probability of this c How would you then use this same Poisson approximation to nd the smallest value of n for which this probability is less than 12 Lecture 21 Midterm 2 crib sheet suggested review Exx on web site 1 Permutations and combinations There are n Elli 1234 n permutations of 71 objects There are Z nlkln 7 ways of choosing a given k objects from n 2 Joint and conditional probabilities If C and D are any events PCUD PC PD 7 PC D The conditional probability of C given D is PC l D PC D PD C and D are independent if PC D PCPD 3 Laws and theorems Suppose E17 7Ek is a partition of 9 That is Ei Ej is empty7 and E1 UEZU UEk Q The law of total probability states that PD Ef pw Eg Ef Pw Ej PEj Bayes7 Theorem states that PEl l D PD l PElPD 4 Random variables and distributions discrete mass continuous density Probability massdensity function pmf PX z pXz pdf fXm de ned for all z with pXm gt 0 700 lt z lt oo Expectation EX Em mez 50 zfXmdz Result E9X Em 9Px If 9fXd Variance EX 7 EX2 7 EX2 5 Standard distributions add meansvariances pX or fX values mean EX variance a Binomial Bnp index n parameter p Z W172 H k 7 0 12 mp 71290722 b Geometric Cp parameter p PX k M1719 k 1234 119 1 729W c Negative Binomial NegBr7 p PXk 171p717pk77 krrlr2 rp rl7pp2 d PoissongPow parameter In PX k exp7uukkl k 0 1 23 p p e 0 Uniform on interval 11 Uab fxzlb7a altmltb ab2 b7a212 f Exponential7 E7 rate parameter fXmexp7x 0 mltoo l l2 No continuous random variables in midterm 2 6 Summation of series a 2201 7 1 22 2 1 17 WW 7 z b fiomiil 1 m xZQ max6 expx Lecture 16 The Bernoulli process and associated random variables 161 The process 0 010 0 0110 010 0 0 0 0 0 010 010 01Eachtrialissuccess10rn0t0 X1X2X3X4 X25 Each X is O or 1 T5 T10 T15 T20 T25 Tn X1 Xn 7 7 7Y1 7 7 7 7Y2Y3 7 7Y4 7 7 7 7 7 7 7 7 7 Y5 7 7Y5 7 7 7 K K is rth inter arrival time W2W3 W4 W5 W7 WT is total waiting time to rth 1 The Bernoulli process is de ned by Xi independent with PX 1 p and PX 0 1 7 p Tn X1 Xn is number of successes ie 1s in rst 71 trials K is the interarrival time number of trials from r 7 1th success to r th WT Y1 Y2 K is number of trials to r th success K K 7 1 number of failures 0 before next success WI K K number of failures 0 before r th success Note WT gt n if and only if Tn lt r 162 Bernoulli and Binomial random variables Ross 46 i X is Bernoullip PX 1 p PX 0 17 p pgtlt117pgtlt0 p p gtlt12 1713 X 02 13 so varX EX2 7 137132 p17p Tn X1 Xn is Binomial 7113 The probability of each sequence of k 1 s and n 7 k 0 s is pk1 7p k and there are Z such sequences PltTn7kgt 7 Zpklt17pgtnk Expectations always add see 152 ETn EX1 EXn pp p 7113 In general variances do NOT add but here they do varTn varX1 varXn np1 713 Unfortunately Ross does not let us talk about when variances can be added until Chapter 6 Alternative derivations of ETn and varTn are given in 182 163 Geometric and Negative Binomial random variables Ross 481 482 K are independent and have Geometric 13 distribution PY k 1 7 pk 1p for k 123 Em 7 2 m 7mm 7 plt17lt17 12gt 7 112 mm 71gt 7 2plt17pgtlt17lt17pgtgt3 7 21 712W So varm 7 mm 71gt Y 7 ltEltYgtgt2 7 207 12W 112 71122 7 171W see More Y Y71 PY k 1 7pkp for k 0123 EY 71 17ppvarY varY see 152153 Note 3 117w so 3M4 117w2zrr711 2 I 20777 WT Y1 K Expectations add so EWT rp In fact again the variances add although Ross will not let us say that yet varWT r1 7 pp2 PWT k Pr71 successes in k71 trials and then success 17 i 17pk fpf 1p for k rr1 WI WT 7 r EWT 7 r varW varWT r k 7 1 PW k Pr 7 1 successes in r k 7 1 trials and then success 1 T 17pk1f 1p fork012 3 777 Lecture 17 Examples of Binomial Geometric and Negative Binomials A hypothetical story Mendel crossed two plants that were red owered but each had one white owered parent He therefore knew that each offspring plant would have white owers with probability 14 independently of all the others He planted one offspring seed each morning and they all grew and each one owered the exact same number of days after planting The rst one owered on June 1 1865 1 By June 20 20 plants had owered a How many of these plants are expected to have white owers b What is the variance of the number of white owered plants c What is the probability that 5 of the plants had white owers 2 On June 8th Mendel saw that the plant newly owered that day had white owers c What is the probability the next white owered plant owers on June 13 a What is the expected date of the next white owered plant b What is the probability that the next white owered plant owers June 15 or later 3 On June 8th Mendel saw that the plant newly owered that day had white owers a What is the expected number of red owers owering before the next white owered plant b What is the variance of this number c What is the probability this number is at least 3 d Mendel s assistant reminds him that the plant owering on June 7 also had white owers and says that therefore by the law of averages77 they will probably have to wait longer than four days for the next white owered plant What does Mendel say 4 On June 8th Mendel saw that the plant newly owered that day had white owers a What is the expected date of owering of the 5 th white owered plant after the one on June 8 b What is the probability the 5 th white owered plant after the one on June 8 owers on June 28 Lecture 18 Poisson random variables approximation to Binomial Ross 47 181 Reminder of facts about the Poisson distribution 1 From 93 PXj e AAjjl forj0123 ii From 154 EX giowe AAzwl 231 we AAzwl 64gt 231 Az lw71l Ma A Then EXX 71 23103090 71e Azwl A 232 AHw 7 2 e AAZeA A2 So then varX EX2 7 EX2 EXX 71 EX 7 EX2 A2 A7 A2 A iii Useful model for numbers of things accidents hurricanes centenarians errors customers judicial va cancies crossovers in genetics see 111 ii when there are a very large number of opportunities for the thing but each has small probability iv In these examples the expected number of accidents errors judicial vacancies is moderate A Typically A is between 1 and 20 However there is no hard upper bound 182 Reminder of facts about the Binomial distribution 1 From 93162 PX 9 p717p 7 forj012n 9 11gtSee162 M 7 Z pjlt17pgt j 7 np711p71lt17pgt 9 j70 9 j71 9 n 1 7 1 an p 17p 1 3 711339 j70 9 EltXltX71gtgt 7 ixwlxpmumw 7 inltn71gtp2Uf2 p7392lt17pgt 7 70 72 n72 n 7 2 7101 71W Z Wl WH 7101 1er 770 9 varX EXX 1 X EXgt2 7101 712 7122701262 71230723 iii Model for number of times something happens in n independent trials coin tosses red owered offspring pea plants Dane speaking German when the probability of the thing happening on each trial is 13 iv In these examples 1 is moderate 025 05 and 71 also usually moderate 10 coin tosses grow 30 pea plants There is a hard upper bound on the value of X 183 Poisson approximation to the Binomial i Let X be a Binomial Binnp random variable and Y a Poisson random variable with parameter A ii Suppose 71 gets large and 13 gets small in such a way that np remains moderate Then we can match up the means EX np A iii Now varX np17p A17p m A varY Wm 9 WWW MIL 1M3 1 7 nn71n7i11 A 239 n 7 1 7 7 7 17An 7 15A exp7A 7 13079 184 Back to the class data on birthdays 37 with 3 pairs Actual probability of no pairs 365 X 364 X gtlt 32936537 01513 APPROXIMATION n 37 X 362 666 not quite independent pairs each pair probability p 1365 A 666365 0182 PX 0 0162 PX 2 3 17 PX 0 7 PX 1 7 PX 2 17 0162 7 0294 7 0268 0275
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'