Statstcs and Quanttatve Analyss U430 Segment 3: Probablty Prof. Sharyn O Halloran
Revew: Descrptve Statstcs Code book for Measures Sample Data Relgon Employed 1. Catholc 0. Unemployed. Protestant 1. Employed 3. Other 9. DK, A 9. Don't Know, o Answer Income Class Lower Upper Measured n Thousands of $ 1. Lower 0. Other 0. Other -99. DK, A. Mddle 1. Lower 1. Upper 3. Upper 9. DK, A 9. DK, A 9. DK, A
Revew: Descrptve Statstcs Survey Data Matrx of Cases and Measured Varables: Case Relgon Employed Class Lower Upper Income 1 1 0 1 1 0 8 3 0 3 0 1 35 3 0 0 0 0 4 1 1 0 0 1 5 1 1 3 0 1 37 6 1 1 1 0 14 7 3 0 0 0 0 8 0 0 0 18 9 9 1 1 0-99 10 9 0 9 9 9 11 Mode 0 0 0 0 Medan /A 0 0 0 18 Mean /A.33 /A.33. 19.44 Varance /A.3 /A.3.173 93.36 Standard Devaton /A.471 /A.471.416 9.66
Frequency Tables RELIGIO Mappng raw data nto a frequency table RELIGIO CODED VALUE FREQUECY CATHOLIC 1 3 PROTESTAT 4 OTHER 3 DK, A 1 MODE PROTESTAT (). CLASS Frequency: umber of tmes we observe an event CLASS CODED VALUE FREQUECY LOWER 1 3 MIDDLE 4 UPPER 3 DK, A 1 MODE MIDDLE () MEDIA MIDDLE () EMPLOYMET EMPLOYED CODED VALUE FREQUECY UEMPLOYED 0 6 EMPLOYED 1 3 DK, A 1 MODE UEMPLOYED (0) MEDIA UEMPLOYED (0) MEA 1/3
Dsplayng Data Income by Category Relgon Frequency 4.5 4 3.5 3.5 1.5 1 0.5 0 LOWER MIDDLE UPPER Don't Know/ A Income Category FREQUECY 30% 40% 10% 0% CATHOLIC PROTESTAT OTHER DK, A Frequency data can be dsplayed ether as a bar chart or as a pe chart. Example of Homework 1.xls
Calculatng Descrptve Statstcs Mean X 1 X or X 1 x f Varance s 1 ( X X ) 1 or s 1 f ( x X ) 1 Example of Homework 1.xls
Example: Employment Why s 9? Calculate Mean: X X 1 3/9 0.33 Calculate Varance: s ( X X ) 1 1 S (0 -.33) + (0 -.33) + (0 -.33) + (0 -.33) + (0 -.33) 9 1 0.5. + (0 -.33) + (1-.33) + (1-.33) + (1-.33) Standard Devaton: s 1 ( X X ) 1 s 0.5 0.5
Probablty Theory: Overvew Defnton of Probablty The lkelhood or chance that a partcular event wll occur. Probabltes n real lfe? The chance of ranfall or beng ht by lghtnng. The chance that an ndvdual selected at random wll have an ncome of $50,000. The chance that a new product wll be successful. Why are we dong ths? Basc concepts of probablty provde the foundaton needed to study dstrbutons of events and statstcal nference.
Probablty Theory: Elements Outcome The results of the process or phenomenon under study. Event Each possble type of occurrence or outcome. Smple event A sngle characterstc or occurrence of event. Sample Space The collecton of all possble events.
Probablty Theory: Facts Propertes Any probablty s a number between 0 and 1. All possble outcomes together must have the probablty of 1. The probablty that an event does not occur s 1 mnus the probablty that the event does occur. Addton Rule If two event have no outcomes n common, the probablty that one or the other occurs s the sum of ther ndvdual probabltes. Multplcaton Rule If two events are ndependent, the probablty that they both occur together s the product of ther ndvdual probabltes.
Probablty Theory: Random Events Random phenomena: Unpredctable events n the short run but dsplay regular behavor when repeated many tmes. Probablty descrbes ths regular behavor. The probablty of an event s the proporton of repettons n whch that event occurs. Example: Rollng Dce probabltes.xls The more tmes you repeat the process, the probablty converges to the target probablty.
Probablty Theory: Calculatng Probabltes Smple Probablty The relatve frequency wth whch events occur when repeated many tmes. Property of Large umbers: f ( x) As gets large Example: toss a con P(x) Frst ten throws may not be exactly 5 heads and 5 tals. But as the number of trals ncreases, the rato of heads wll tend (converge) towards ½.
Probablty Theory: Example Experment: Toss a con 3 tmes Outcome Space {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT} Smple probablty: The frequency of an event dvded by the total number of outcomes. What s the probablty of observng heads n 3 tosses? 3 outcomes out of 8 that ft the crtera. P( H) P ( A) f ( A) ( H ) f Total # of 3 P( H ) 8 events 0.375
Probablty Theory: Compound Events Probablty of (A and B) Intersecton of Events (A B) A B Intersecton of A and B The relatve frequency of the events that meet both crtera. Formula: Example: P ( A and B ) ( and 1stH ) ( A and What s the probablty of exactly two heads AD havng the frst toss be heads? P f B) f ( H and 1stH) H 8
Probablty Theory: Compound Events Probablty of (A or B) Unon of Events (A B) Defnton: A B Unon of A and B The probablty of A or B s the relatve frequency of the events that meet ether crtera. Example: P ( A or B ) f ( A or What s the probablty of gettng ether exactly heads or no heads at all? f ( H or 0H) 4 P(H or 0H) 8 B) 1
Probablty Theory: Condtonal Probablty Probablty of (A gven B) Condtonal Probablty of A occurrng Defnton: The probablty of A gven B has occurred. Example: P ( A / B ) P ( A and P ( B ) What s the probablty that the frst toss s a head gven that there are exactly two heads? P(1stH and H) 8 P(1stH/H) P(H) 3 3 8 A B B ) Intersecton of A and B Gven B
Example: Martal Status by Age Group Age 18 to 4 5 to 64 65 and over Total Marred 3,046 48,116 7,767 58,99 ever Marred 9,89 9,5 768 19,309 Wdowed 19,45 8,636 11,080 Dvorced 60 8,916 1,091 10,67 Total 1,614 68,709 18,6 99,585 P(Marred age18 to 4) P(marred and 18 to 4) P(18 to 4) Martal.xls example umber n thousands 60,000 50,000 40,000 30,000 0,000 10,000 0 Women Age 18 and over by age and martal status (thousands) Marred ever Marred Wdowed Dvorced Age 18 to 4 Age 5 to 64 Age 65 and over category
Probablty Theory: Contngency Tables Example: Roll a Dce and Flp a Con Defnton DIE 1/6 1/6 1/6 1/6 1/6 1/6 COI 1 3 4 5 6 TOTAL 1/ Heads 1/1 1/1 1/1 1/1 1/1 1/1 1/ 1/ Tals 1/1 1/1 1/1 1/1 1/1 1/1 1/ TOTAL 1/6 1/6 1/6 1/6 1/6 1/6 1 The jont probablty of tossng a Head and Rollng a 6 f ( H and 6) P( H and 6) What s the probablty of T gven that you rolled a 6? P(T/6) P(T AD 6) P(6) 1/1 1/6 1 1 1/
Probablty Theory: Independence Defnton: The occurrence of one event does not affect the probablty of the other. Formula: P(A B) P(A) Interpretaton: If knowng that B occurs gves no nformaton about A, then A and B are ndependent events. Example of Independent Events: Ranfall n Taht and the percent change of the Dow. Example of on-ndependent Events: Income and educaton
Probablty Theory: Independence (con t) Example: 0% of the students play football, 50% play basketball, and 15% play both. How can we put ths nto a table? What's the probablty that a student selected at random wll: FOOTBALL BASKETBALL YES O TOTAL YES O 15% 5% 35% 45% 50% 50% TOTAL 0% 80% 100% Play nether sport? 45% Play football or basketball? f ( F or B ) 5 + 35 + 15 P ( F or B ) 100 55 % Are playng basketball and football ndependent? P(B F) P(B) o, the events are not ndependent. If you play basketball, also lkely to play football P ( B and F ) 15 P ( B / F ) P ( F ) 0 75 % 50%