Presentation on theme: "Case: The Roulette Wheel Goodness of Fit Tests"— Presentation transcript:
1 Case: The Roulette Wheel Goodness of Fit Tests Class 0607Case: The Roulette WheelGoodness of Fit TestsEMBS 11.2
2 What we learned last class Probability Distributions have characteristicsDescriptive Statistics are used to estimate those characteristics.Location (mean, median, mode)Variability (variance and standard deviation)Shape (skewness)The MEAN is important.Sample mean “value” times n is total value.Measures of variability are under-appreciated
4 Baseball Statistics A batter came to the plate five times Got a hit Struck OutWalkedFlied OutGrounded OutWALK is the fault of the pitcher: 1 success in 4 trialsBatting Average = ¼ = 0.250WALK is the fault of the batter: 2 successes in 5 trialsOn Base Percentage = 2/5 = 0.400
5 The Roulette wheel.Surveillance video of 18 hours of play of a roulette wheel in a Reno, Nevada casino904 spins of the wheel22,527 bets places
6 OutcomeFrequencyNumber of Bets0022354182351825442193059513622024983245021264473283573257641537574656364616363521768270386332749095038271048429878117833369512360316641352592514649176133403459716643356271,07936641Total90422,527
7 First We Examine the Wheel H0: The wheel works properlyH0: All 38 outcomes have equal probability of occurringH0: P0=P28=P9=…=P2=1/38HA: they are not all equalLike before, the Hypothesis is about a parameter of a probability distribution
8 Goodness-of-fit Test Calculate the expected counts under H0 OutcomeObservedExpectedDistance002223.790.13250.061230.032301.623280.754153.2556200.6078260.21910240.001112210.331314270.4316171819322.831.410.9629333.57311.141.94343536Total90431.20Calculate the expected counts under H0Calculate the Distances as (O-E)2/EThe sum of the distances is the test statistic. We call it the calculated chi-squared.We reject H0 (and say the results are statistically significant) if the calculated chi-squared statistic is too big.The calculated chi-squared statisticThe sum of the distances.
9 We need a p-value! For the lady tasting tea For a GOODNESS OF FIT TEST Number correct depends on n and PFor the lady tasting teaP(X≥8 │ H0) = 1-binomdist(7,10,.5,true)Pvalue = 0.055For a GOODNESS OF FIT TESTP(χ2≥ calculated χ2 │H0) = chidist(calculated χ2, dof)dof stands for “degrees of freedom”dof is the parameter of the chi-squared distributiondof here is 37, the number of cells - 1.P(χ2≥ 31.2│H0) = chidist(31.2,37)Pvalue = 0.74χ2 depends on number of cells - 1.Can also use=chisq.dist.rt(31.2,37)NOT statistically significant.
10 WARNINGThe chi-squared test does not work well when some cells have low expected counts.If some cells have expected counts < 5, combine then with neighboring cells.
11 Roulette Wheel Demonstration H0: All 38 are equally likely to get bet on.Ha: The p’s are not equal. (Some segments are more popular than others)
12 H0: The Fill Amounts are Normally Distributed with μ=10.2 and σ=0.16 Lorex PharmaH0: The Fill Amounts are Normally Distributed with μ=10.2 and σ=0.16Ha: They are not…
13 Assignment 08 Due Monday, Feb 13 Youth Soccer (football) teams from several countries compete annually in an important international tournament.The birth months (Jan=1, Feb=2, .. Dec=12) of the 288 boys competing in the 2005 under 16 division showed higher counts for the early months and lower counts for the later months.Formulate and test a relevant hypothesisIf you find statistical significance, offer an option about how it came to be that early months are more prevalent.opinionHelsen, W.F., Van Winckel, J., and WIlliams, M., The relative age effect in youth soccer across Europe, Journal of Sports Sciences, June 2005; 23(6):
14 The Data look like….. ID Birth Month 1 5 2 3 285 286 287 288 .