S2 Chapter 7: Hypothesis Testing Dr J Frost (jfrosttiffin.kingston.sch.uk) Last modified: 24th November 2015 To get a flavour of hypothesis testing, discuss how you would approach the following problem: In 2013 in Richmond park, whenever I
Related Topics
Share
Embed code
Download this presentation From Below
"S2 Chapter 7: Hypothesis Testing Dr J Frost" is the property of its rightful owner. Permission is granted to
download and print the materials on this website for personal, non-commercial use only, and to display it
on your personal computer provided you do not modify the materials and that you retain all copyright
notices contained in the materials. By downloading content from our website, you accept the terms of this
agreement.
Presentation Transcript
01
S2 Chapter 7: Hypothesis Testing Dr J Frost (jfrost@tiffin.kingston.sch.uk) Last modified: 24th November 2015<br>
02
To get a flavour of hypothesis testing, discuss how you would approach the following problem: In 2013 in Richmond park, whenever I went on an hour long stroll, I saw on average 10 squirrels. I want to establish whether now in 2014, the rate of squirrels I see has increased. I need to ensure any result I get is statistically significant. Go on a stroll one day in 2014 and count the number of squirrels I see. Suppose I saw 15 squirrels.
If I were to assume that the rate at which I see squirrels hasn’t changed, I would calculate the probability that I would see 15 squirrels or more (using a Poisson Distribution).
If this probability of seeing at least 15 squirrels by chance is sufficiently low (say less than 5%), I conclude that the rate at which squirrels appear has increased. Note: This first lesson will be mostly note-taking, so pay attention!<br>
03
Hypothesis testing in a nutshell* then is:
We have some hypothesis we wish to see if true (average rate of squirrels seen has increased), so…
We collect some sample data (giving us our test statistic) and…
If that data is sufficiently unlikely to have emerged ‘just by chance’, then we conclude that our (alternate) hypothesis is correct. * Squirrel pun intended. !<br>
04
We said that our two hypotheses are about the population parameter. ? ?<br>
05
As before, we’re interested how likely a given outcome is likely to happen ‘just by chance’ under the null hypothesis (i.e. when the coin is not biased). ?<br>
06
What’s the probability that we would see 6 heads, or an even more extreme value? Is this sufficiently unlikely to support John’s claim that the coin is biased? What’s the probability that we would see 7 heads, or an even more extreme value? ? ?<br>
07
! The value(s) on the boundary of the critical region are called critical value(s). ? We’ll explore more fully critical values and regions later on… ?<br>
08
Coin thrown 5 times. Trying to establish if biased towards heads. Coin thrown 10 times. Trying to establish if biased towards heads. Coin thrown 10 times. Trying to establish if biased towards tails. ? ? ?<br>
09
?<br>
10
Accidents used to occur at a road junction at a rate of 6 per month. After a speed limit is placed on the road the number of accidents in the following month is 2. The planners wish to test, at the 5% level of significance, whether or not there has been a decrease in the rate of accidents. a) Suggest a suitable test statistic. b) Write down the null and alternative hypothesis. c) Explain the conditions under which the null hypothesis is rejected. The number of accidents in a month. ? ? ? ?<br>
11
3 5 7 ? ? ? ? ?<br>
12
Q From earlier: 4. State conclusion. Address:
Is result significant or not?
What are implications in terms of context of original problem? ? ? ?<br>
13
Over a long period of time it has been found that in Enrico’s restaurant the ratio of non-veg to veg meals is 2 to 1. In Manuel’s restaurant in a random sample of 10 people ordering meals, 1 ordered a vegetarian meal. Using a 5% level of significance, test whether or not the proportion of people eating veg meals in Manuel’s restaurant is different to that in Enrico’s restaurant. Q1 Half significance as 2 tailed. Conclusion and what it means in context. ?<br>
14
Accidents used to occur at a certain road junction at a rate of 6 per month. The residents petitioned for traffic lights. In the month after the lights were installed there was only 1 accident. Does this give sufficient evidence that the lights have reduced the number of accidents? Use a 5% level of significance. Q2 Over a long period of time, Jessie found that the bus taking her to school was late at the rate of 6.7 times per month. In the month following the start of the new summer bus schedules, Jessie finds that her bus is late twice. Assuming that the number of times the bus is late has a Poisson distribution, test at the 1% level of significance, whether or not the new schedules have in fact decreased the number of times the bus is late. Q3 (Note: Poisson tables can be used for Q2 but not for Q3) ? ?<br>
15
1 9 11 13 15 ? ? ? ? ?<br>
16
There are two options for carrying out hypothesis tests:
Calculate the probability of the outcome “or worse” and see if this is lower than the significance level (as we just did).
Calculate the critical regions and see if the test statistic lies within it.
We earlier touched upon finding critical value(s), i.e. those at which (and beyond which) we reject the null hypothesis. ?<br>
17
Coin thrown 5 times. Trying to establish if biased towards heads. Coin thrown 10 times. Trying to establish if biased towards heads. Coin thrown 10 times. Trying to establish if biased towards tails. ? ? ?<br>
18
0.252 0.02 0.015 0.013 0.3 0.4 ? In an exam, they will say “find the value as close to 0.025 as possible.”<br>
19
Only if specifically instructed to find the closest to 2.5% for each tail:
For the left tail, just find the closest value in the table.
Find the right tail, use the value just AFTER the closest one. ? ?<br>
20
May 2013 Q6 M1
A1
A1
A1 A1 As per tip, use the value in your table AFTER the first to exceed 0.975. ?<br>
21
An office finds that over a long time incoming telephone calls from customers occur at a rate of 0.325 per minute. They believe that the number of calls has changed recently. To test this, the number of incoming calls during a random 20-minute interval is recorded.
Find the critical region for a two-tailed test of the hypothesis that the number of incoming calls occur at the rate of 0.325 per minute. The probability in both tails should be as close to 2.5% as possible. ? Q<br>
22
Bro Tip: Don’t forget your continuity correction! (recall: you make the range 0.5 wider) A shop sells grass mowers at the rate of 10 per week. In an attempt to increase sales, the price was reduced for a six-week period. During this period a total of 75 mowers were sold.
Using a 5% level of significance, test whether or not there is evidence that the average number of sales per week has increased during this six-week period. Q1 ?<br>
23
During an influenza epidemic, 4% of the population of a large city was affected on a given day. The manager of a factory that employs 100 people found that 12 of his employees were absent, claiming to have influenza.
Using a 5% level of significance, find the critical region that would enable the manage to test whether there is evidence that percentage of people having influenza at his factory was greater than that of the city, and state your conclusion. Q2 ?<br>