Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis (significance) Testing Using the Binomial Distribution.

Similar presentations


Presentation on theme: "Hypothesis (significance) Testing Using the Binomial Distribution."— Presentation transcript:

1 Hypothesis (significance) Testing Using the Binomial Distribution

2 Hypothesis the idea: We use random samples to estimate population parameters – If we assume that our random sample comes from a particular background distribution we can test to see if the result is likely or unlikely, given that distribution If the test result is very unlikely we may decide that the data does not come from our background Distribution If the test result is likely we will decide that the data comes from our background distribution We determine how likely through our significance level

3 We can answer questions like this - Is a dice fair ? (comparing our sample result against the expected result) -Does a new drug give better results than an old drug ? (by comparing our sample result against expected result) -Can you taste the difference between Coke and Pepsi? (by comparing our sample result against expected result) IN all the questions this week we will assume a population from the Binomial Distribution and we will compare our OBSERVED data VS EXPECTED Data to draw a conclusion

4 The binomial Distribution — 2 possible outcomes — Probability of Success Failure does not change during Trials — There are a fixed number of trials — Trials are Independent Plan of action We will learn through a question You should have understood how to use Binomial tables yesterday if nothing else!!

5 Question A six sided dice is thrown 20 times and the number of sixes recorded. Only 2 sixes come up. Is the dice loaded? – The number of sixes is our Discrete Random Variable (X) – It follows a Binomial because You either get a six or you do not – The probability of getting a six does not change for each dice roll X~B(20,p) we can assume that for a proper dice p = 1/6 Now we set up a test to see if our sample fits a X~B(30,1/6) model

6 We always write the process formally!! Step 1 – state Null Hypothesis Ho : P(6)=1/6 (probability of getting a six is unbiased~ B(20,1/6) Step 2- state Alternative Hypothesis H 1 : P(6)<1/6 (probability of getting six is less than 1/6 – biased) Step 3- Decide on a significance level to test at Given at 5% usually Step 4 – From Tables ->Find the CRITICAL VALUE of P(X≤Xc) that CUTS OFF ≤ 5% This is find P(X≤xc) ≤ 0.05 i.e. The lower tail of the distribution - The Critical Value is Xc Step 5 – Is our Observed value < The critical value If so Accept H1, otherwise Accept Ho

7 This is X-B(20,1/6) r P(X = r)P(X <= r)P(X >= r) 00.0241 1.0000 10.09860.12270.9759 20.19190.31460.8773 30.23580.55040.6854 40.20530.75570.4496 50.13450.89020.2443 60.06890.95910.1098 70.02820.98730.0409 80.00940.99670.0127 90.00260.99930.0033 100.00060.99990.0007 110.00011.00000.0001 120.00001.00000.0000 130.00001.00000.0000 140.00001.00000.0000 150.00001.00000.0000 160.00001.00000.0000 170.00001.00000.0000 180.00001.00000.0000 190.00001.00000.0000 200.00001.00000.0000 These are the outcomes we observed 2 If Ho is true E(X) = np = 20x1/6 = 3.33 We would expect to get around 3 sixes From Tables Xc = 0 P(X≤0) = 0.0241 P(X ≤1) = 0.1227 Choose nearest result to 0.05 and ≤ 0.05

8 So............ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Xc the critical value The Observed value This is the expected value (μ) given X~B(20,1/6) Conclusion The observed value is greater than the critical value so do not reject Ho (The observed value is not significantly different from the expected value) P(X≤ 1) is >5% so getting a result of 1 six is not unusual enough to reject Ho WE SAY THERE IS NOT SUFFICIENT EVIDENCE TO SAY THE DICE IS BIASED One tailed test looking at the lower end of the tail

9 Example II A drug for curing headaches has been found to be 75% effective from research A new drug has been tested on 20 people and 18 have reported that their headaches have been cured. The drug company state in their TV advert that their new drug is better than the old one. Are they justified in saying this? The drugs could be said to fit a Binomial X~B(20,p) For the old drug P=0.75, For the new drug the claim is P>0.75 Step 1 – State the NULL Hypothesis Ho: P=0.75 (Nothing has changed new drug same as old) Step 2 – State the Alternative Hypothesis Ho: P>0.75 (New drug has improved cure rate)

10 This is another one tailed test But it looks at the other end of the distribution Ho: P=0.75 (Nothing has changed new drug same as old) Ho: P>0.75 (New drug has improved cure rate) Step 3 – State the significance level (given as 5% here = 0.05) Step 4- From tables find the critical value (cuts off 5% of the tail of the distribution) That is P(X≥Xc) < 0.05 We rearrange this because our tables only give P(X≤r) P(X≥Xc)= 1.0 - P(X≤Xc-1) so 1.0 - P(X≤Xc-1) < 0.05 Therefore P(X ≤Xc-1) > 0.95 From Tables P(X ≤ 17) = 0.9087 P(X ≤ 18) = 0.9757 (  This one) So Xc-1 = 18 Xc = 19 (This is our Critical Value) r P(X = r)P(X <= r)P(X >= r) 00.0000 1.0000 10.0000 1.0000 20.0000 1.0000 30.0000 1.0000 40.0000 1.0000 50.0000 1.0000 60.0000 1.0000 70.0002 1.0000 80.00080.00090.9998 90.00300.00390.9991 100.00990.01390.9961 110.02710.04090.9861 120.06090.10180.9591 130.11240.21420.8982 140.16860.38280.7858 150.20230.58520.6172 160.18970.77480.4148 170.13390.90870.2252 180.06690.97570.0913 190.02110.99680.0243 200.00321.00000.0032

11 Xc = 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Critical Value ≤ 1 % Observed value E(X) | X~B(20,.75)Expected value given Ho Conclusion : So we Have No evidence to Reject Ho There is not enough evidence to say that the new drug is better

12 Binomial Hypothesis testing One tailed tests These are one tailed tests because H1 is P p1 Write your answers formally....You MUST 1- Write down the Null Hypothesis and Alternative Hypothesis 2- You should state the underlying Distribution on which Ho is based 3- Ho always represents No change ; H1 always Change 4- The question will give you the Significance level otherwise assume 5% 5 – Calculate the Critical Value either P(X ≤ Xc) < 0.05 for left tail OR P(X ≥ Xc) < 0.05 for Right tail 6- If the Observed value is Not in the Critical region Accept Ho 7 – Write your conclusions clearly in English

13 Your Turn Question Mrs De Silva is running for President. She claims to have 60% of the population voting for her. She is suspected of overestimating her level of support. You want to test this, so you take a random sample of 20 people and find that only 9 will vote for Mrs De Silva. Test at the 5% level that she has overestimated her support.


Download ppt "Hypothesis (significance) Testing Using the Binomial Distribution."

Similar presentations


Ads by Google