Presentation is loading. Please wait.

Presentation is loading. Please wait.

A2-Level Maths: Statistics 2 for Edexcel

Similar presentations


Presentation on theme: "A2-Level Maths: Statistics 2 for Edexcel"— Presentation transcript:

1 A2-Level Maths: Statistics 2 for Edexcel
S2.4 Hypothesis tests These icons indicate that teacher’s notes or useful web addresses are available in the Notes Page. This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions, see the Getting Started presentation. 1 of 57 © Boardworks Ltd 2006

2 Introduction to sampling
Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 2 of 57 © Boardworks Ltd 2006

3 National census The British government carries out a census of the entire population of the United Kingdom every 10 years (most recently in April 2001). The first census in the United Kingdom was carried out in 1086 with the construction of the Doomesday Book. However they have only been conducted on a regular basis since 1801. The census provides the government with a detailed picture of the population living in each part of the country (town, city or countryside). The results are used to help plan public services (health, housing, transport and education) for the future. Visit the Census 2001 website to find out some facts about the UK population:

4 Introduction to sampling
In statistics we often want to obtain information from a group of individuals or about a group of objects. The population is the set of all individuals or objects that we wish to study. A census is an investigation in which information is obtained from every member of the population. A sampling frame is a list of all members of the population.

5 Introduction to sampling
Examples: A head teacher is interested in finding out how long her sixth form students spend in part-time employment each week. The population is the set of all sixth form students in her school. A possible sampling frame would be the registers of sixth form tutor groups. 2. A newspaper is interested in obtaining the views of residents living close to the site of a proposed new airport. The population might be all adults living within a 10 mile radius of the site. A possible sampling frame could be the local electoral roll.

6 Introduction to sampling
Examples: 3. A car company has discovered a fault that affects one of their models of car. The company may wish to know how widespread the problem might be. The population would be all cars produced of this particular model. A possible sampling frame would be a list of all registered cars of this model provided by the DVLA.

7 Introduction to sampling
Carrying out a census of the entire population is usually not feasible or sensible. A census is usually costly in terms of money time resources In addition, some investigations could result in the destruction of the entire population! For example, if a light bulb manufacturer wished to investigate the lifetime of its bulbs, a census would result in the destruction of all the bulbs it produced. Discuss with your class the problems of carrying out a census. In particular, a census is usually very time-consuming so the results of a census can sometimes be out-of-date before a census has been completed. The amount of effort required in carrying out a census could result in short-cuts being taken.

8 Introduction to sampling
Instead of surveying the whole population, information can instead be obtained from a sample. The sampling process should be undertaken carefully to ensure that the sample is representative of the entire population. Bias can occur if one section of the population is over- or under-represented. Question: A local council wishes to know the views of local people on public transport. Criticize each of the following sampling regimes: Possible criticisms of the sampling regimes offered here might be: The people already using public transport will not be representative of the community as a whole. People who fill in questionnaires will not be representative of adults as a whole. They are more likely to be filled in by people with a lot of spare time or by people who hold strong views. Also not everyone uses their local library. People using the shopping centre on a Thursday morning are likely to be retired or unemployed people, therefore not representative of the whole population. Ask the people waiting at the town centre bus stop. Leave questionnaires in local libraries for people to fill in. Ask people at the shopping centre on a Thursday morning.

9 Sampling methods One way to obtain a fair sample is to use random sampling. This method gives every member of the population an equal chance of being chosen for the sample. A more formal definition of a random sample is as follows: A sample of size n is called a random sample if every possible selection of size n has the same probability of being chosen. There are a number of ways in which a random sample can be chosen. One commonly used technique is to use random number tables.

10 Random number tables The table below gives a list of random digits:
Here is how to use random digits to obtain a sample: Example: A sample of size 15 is required from a population of size 300. One possible approach would be to obtain a sampling frame for the population and number every member from 001 to 300. You could then obtain chains of 3 random digits from tables. If the chain corresponds to a number between 001 and 300 you could select that member of the population; otherwise you could discard that chain and choose another.

11 Random number tables Example (continued): This method is wasteful of random digits since most chains of 3 digits will be discarded. A more efficient strategy would be to assign each member of the population to several chains of random digits: Population member Random digits 1 2 3 300 This approach leads to only chains of digits between 901 and 000 being discarded.

12 Random number tables Example (continued): Suppose that we use the 2nd line of random digits in the above table, then the sample chosen would be: 834 → 234 193 → 193 439 → 139 102 → 102 356 → 56 206 → 206 753 → 153 335 → 35 713 → 113 416 → 116 584 → 284 438 → 138 085 → 85 966 (cannot be used) 235 → 235 418 → 118

13 Contents Hypothesis testing Introduction to sampling
Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 13 of 57 © Boardworks Ltd 2006

14 Introduction to hypothesis testing
Is a new cancer drug more effective than an existing treatment?

15 Introduction to hypothesis testing
Has the installation of a new speed camera led to a reduction in the traffic speed?

16 Introduction to hypothesis testing
A candidate in an election claims 60% support. Is the candidate exaggerating their level of support?

17 Introduction to hypothesis testing
Hypothesis testing is concerned with trying to answer questions like these. Hypothesis tests are crucial in many subject areas including medicine, psychology, biology and geography. In S1, we only deal with situations where we are testing a probability or a proportion.

18 A simple introductory example
Consider the following simple situation. You suspect that a die is biased towards the number six. In order to test this suspicion, you could perform an experiment in which the die is thrown 20 times. If the die were fair, you would expect about 3 sixes. If you obtained a lot more than 3 sixes then you might decide that there is evidence to support your suspicions. But how do you decide on what a suspicious number of sixes is?

19 A simple introductory example
Consider throwing a fair dice 20 times. The probability of obtaining different numbers of sixes is shown in the graph: Use the graph and the corresponding probabilities to discuss with your students how many sixes they might consider improbable if the dice happened to be fair.

20 A simple introductory example
So, we noticed from the previous slide that, with 20 throws of a fair die, the probability of getting 7 or more sixes is about This means that if a fair die were thrown 20 times over and over again, then you would obtain 7 or more sixes less than once in every 20 experiments. The figure of 1 in 20 (or 5%) is often taken as a cut-off point – results with probabilities below this level are sometimes regarded as being unlikely to have occurred by chance. However, in situations where more evidence is required, cut-off values of 1% or 0.1% are typically used.

21 A formal introduction to hypothesis tests
In hypothesis testing we are essentially presented with two rival hypotheses. Examples might include: “The coin is fair” or “the coin is biased”; “The proportion of local people in favour of a by-pass is 80%” or “the proportion is smaller than 80%”; “The drug has the same effectiveness as an existing treatment” or “the drug is more effective”. These rival hypotheses are referred to as the null and the alternative hypotheses.

22 A formal introduction to hypothesis tests
The null hypothesis (H0) is often thought of as the cautious hypothesis – it represents the usual state of affairs. The alternative hypothesis (H1) is usually the one that we suspect or hope to be true. Hypothesis testing is concerned with examining the data collected in experiments, and deciding how likely the result is to have occurred if the null hypothesis is true. The significance level of the test is the chosen cut-off value between the results that might plausibly have been obtained by chance if H0 is true, and the results that are unlikely to have occurred.

23 A formal introduction to hypothesis tests
Significance levels that are typically used are 10%, 5%, 1% and 0.1%. These significance levels correspond to different rigours of test – the lower the significance level, the stronger the evidence the test will provide. Note: It is important to appreciate that it is not possible to prove that a hypothesis is definitely true in statistics. Hypothesis tests can only provide different degrees of evidence in support of a hypothesis. A 10% significance level can only provide weak evidence in support of a hypothesis. A 0.1% test is much more stringent and can provide very strong evidence.

24 Chocolate tasting practical
Introduction to sampling Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 24 of 57 © Boardworks Ltd 2006

25 Chocolate tasting practical
Do you think you can taste the difference between branded chocolate and supermarket own-label chocolate? You are going to perform an experiment to find out. There will be 2 pieces of chocolate to try: one will be a branded make of chocolate, the other will be a supermarket’s own-brand. Try to identify the branded make. This practical activity works best with a reasonable number of students (say, at least 10) – you may be able to borrow a few students from another class (or there may be a few willing teachers!). Discuss with the students what the null and the alternative hypothesis would be for this experiment (a one-sided test would seem appropriate here) and how they could be written out mathematically. Discuss also what significance level (e.g. 5%) would be appropriate for this test.

26 Chocolate tasting practical
First input the number of people taking part in the activity and press ENTER. The probability distribution (under H0) is then shown graphically Enter the results by pressing the up arrow once for each student that correctly identifies the branded chocolate. The bars of the graph that correspond to results that are greater than the result entered are coloured red. They change as the results are entered, and the tail probability is displayed. Discuss with the students how to interpret the probability in relation to the chosen significance level.

27 One-sided hypothesis tests
Introduction to sampling Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 27 of 57 © Boardworks Ltd 2006

28 One-sided hypothesis tests
Example: Mr Jones, a candidate in a local election, claims to have the support of 40% of the electorate. A rival candidate, Miss Smith, believes that Mr Jones is exaggerating his level of support. She asks a random sample of 12 local people and discovers that 3 of them support Mr Jones. Carry out a test at the 5% significance level to see whether there is evidence that Mr Jones is exaggerating his level of support.

29 One-sided hypothesis tests
Solution: We begin by writing down the 2 rival hypotheses. Let p represent the proportion of the electorate who support Mr Jones. H0: p = 0.4 H1: p < 0.4 Notice that the hypotheses have been written mathematically, in terms of a parameter, p. This hypothesis represents our cautious belief, i.e. that Mr Jones is not lying about his support. This hypothesis represents what is suspected to be true, i.e. that Mr Jones is exaggerating. Significance level = 5% Let X be the number of people in the sample who support Mr Jones. If the null hypothesis is true, then X ~ B(12, 0.4). The observed data was x = 3. This is less than we would expect if H0 were true, but is this result so extreme that it is implausible?

30 One-sided hypothesis tests
We calculate P(X ≤ 3): The probability of results at least as extreme as those obtained. So, P(X ≤ 3) = The significance level in this test was chosen to be 5% – the probability calculated was much higher than this. We conclude: the evidence is not strong enough to reject H0 at the 5% significance level. The data does not provide evidence that Mr Jones was exaggerating his support.

31 One-sided hypothesis tests
The steps required to answer a hypothesis test question in a S1 examination are: Step 1: Write out H0 and H1 in mathematical terms. Step 2: State the significance level – if none is mentioned in the question, it is usual to choose 5%. Step 3: State the distribution, assuming the null hypothesis to be true. Step 4: Calculate the probability (under H0) of obtaining results as extreme as those collected. Step 5: Compare the probability with the significance level and make conclusions – can H0 be rejected or not? Interpret your results in context.

32 One-sided hypothesis tests
Examination style question: The standard treatment for a particular medical condition has a success rate of 70%. A new drug is launched which, it is claimed, treats a greater proportion of patients successfully. A doctor tries the new drug on 20 patients and finds that it successfully treats 19 of them. Test at the 1% significance level whether there is evidence to suggest that the new drug treatment is more successful than the standard treatment.

33 One-sided hypothesis tests
Solution: Let p represent the proportion of patients that are treated successfully. H0: p = 0.7 H1: p > 0.7 The new treatment is no more successful than the existing treatment. The new treatment is better than the standard treatment. Significance level = 1% Let X be the number of people successfully treated by the new drug. If the null hypothesis is true, then X ~ B(20, 0.7). The observed data is x = 19. Using tables, P(X ≥ 19) = < 1%. We reject the null hypothesis at the 1% level – there is quite strong evidence that the new treatment is more successful.

34 One-sided versus two-sided tests
Introduction to sampling Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 34 of 57 © Boardworks Ltd 2006

35 One-sided versus two-sided tests
The examples considered so far can all be classified as one-sided tests – we have been testing for either an increase or a decrease in the value of the parameter, p. Sometimes we are not looking specifically for an increase (or decrease) in p, but instead we may want to examine whether the value of p has changed. In these situations we use a two-sided (or a two-tailed) test. A two-sided hypothesis test carried out at the α% significance level is in a sense two separate one-sided tests. The significance level is therefore shared between these two tests, ½α% for each tail.

36 One-sided versus two-sided tests
Example: A restaurant has traditionally found that 60% of its customers have been pleased or very pleased with the quality of the food served. A new chef is appointed and the restaurant management wish to find out whether this has changed the proportion of customers who are happy with their food. The management question 16 diners and discover that 14 of them are pleased or very pleased with their food. Test at the 5% significance level whether there has been a change in the proportion of contented customers.

37 One-sided versus two-sided tests
Solution: Let p represent the proportion of customers pleased or very pleased with the quality of the food served. The hypotheses can be stated as follows: Ho: p = 0.6 (i.e. no change) H1: p ≠ 0.6 (i.e. a change in the proportion). 5% significance level (2.5% for each tail). Let X represent the number of customers that are pleased or very pleased with their food. Then under the null hypothesis, X ~ B(16, 0.6).

38 One-sided versus two-sided tests
If H0 were true, we would expect 16 × 0.6 = 9.6 customers to be pleased with the food quality. The observed number, 14, is on the high side. We calculate P(X ≥ 14): So P(X ≥ 14) = < 2.5%. Conclusion: We can reject the null hypothesis at the 5% significance level. There is some evidence that the proportion pleased or very pleased with their food has changed.

39 One-sided versus two-sided tests
Examination style question: A driving instructor knows from past experience that 2 out of 3 of his students pass their driving test first time. A new driving examiner is employed at the test centre. The instructor wants to know whether this has changed the proportion of his students passing their test at the first attempt. He monitors the next 12 of his students taking their tests and finds that 6 pass their test first time round. a) Write down a suitable null and alternative hypothesis for this test. Explain why your alternative hypothesis has the form it has. b) Carry out the test at a 10% significance level.

40 One-sided versus two-sided tests
Solution: H0: p = 2/3 H1: p ≠ 2/3 The alternative hypothesis is two-sided since the instructor is looking for a change in the proportion of his students passing first time. a) Let p represent the proportion of candidates now passing on the first attempt. 10% significance level (5% for each tail). Let X = number of students passing on first try. Then under H0, X ~ B(12, 2/3)

41 One-sided versus two-sided tests
We would expect 8 candidates to pass on the first attempt if the null hypothesis were true. The observed number, 6, is on the low side. We need to calculate P(X ≤ 6). Using tables, this probability is > 5%. Conclusion: We are unable to reject the null hypothesis. The data does not provide enough evidence to suggest that the proportion of candidates passing their driving test at the first attempt has altered.

42 Contents Critical regions Introduction to sampling
Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 42 of 57 © Boardworks Ltd 2006

43 Critical regions The critical (or rejection) region for a hypothesis test is the range of values for which the null hypothesis could be rejected. Example 1: Police records show that 25% of the vehicles using a stretch of road exceed the speed limit. A new speed camera is installed. The police wish to find out whether this has led to a reduction in the proportion of drivers speeding. The police sample 20 cars driving along the stretch of road. a) Find the critical region for a test carried out at the 5% significance level. b) Comment on the implications of the test if the police find 2 speeding drivers.

44 Critical regions H0: p = 0.25 where p = proportion of drivers who speed. H1: p < 0.25 Significance level = 5% Let X = number of cars that exceed speed limit. Under H0, X ~ B(20, 0.25). From tables, P(X ≤ 2) = > 5% (so the critical region does not contain 2) P(X ≤ 1) = < 5% (so x = 1 is contained in the critical region). Thus, the critical region for the test is x ≤ 1.

45 Critical regions The actual number of speeding motorists is 2.
This number is not contained within the critical region. Therefore we cannot reject the null hypothesis at the 5% level. The evidence does not support the theory that the proportion of motorists that speed has changed.

46 Critical regions Examination style question: A gardener knows from past experience that 80% of the runner bean seeds that he plants will germinate. He is forced to switch to a different brand of seed. He wants to find out whether this has led to a change in the germination rate of his runner beans. He plants 25 seeds. Let X represent the number of seeds that germinate. Find the critical region for a hypothesis test carried out at the 10% significance level.

47 Critical regions Solution:
H0: p = 0.8 (p = proportion of seeds that germinate). H1: p ≠ 0.8 Significance level = 10% (5% for each tail). Under H0, X ~ B(25, 0.8). There will be two parts to the critical region, one corresponding to each tail of the test. Lower tail: Using tables, P(X ≤ 17) = > 5% P(X ≤ 16) = < 5% Therefore the lower part of the critical region is x ≤ 16.

48 Critical regions Upper tail: P(X ≥ 23) = 1 – P(X ≤ 22) = 1 – = > 5% P(X ≥ 24) = 1 – P(X ≤ 23) = 1 – = < 5% Therefore part of the critical region for the upper tail is x ≥ 24. Combining these two parts, the critical region for the whole test is x ≤ 16 or x ≥ 24.

49 Hypothesis tests and critical regions
Introduction to sampling Introduction to hypothesis testing Chocolate tasting practical One-sided hypothesis tests One-sided versus two-sided tests Critical regions Hypothesis tests and critical regions Contents 49 of 57 © Boardworks Ltd 2006

50 Hypothesis tests on a Poisson mean
The steps for performing a hypothesis test on the value of a Poisson mean are the same as for a binomial probability: Step 1: Step 2: Step 3: Step 4: Step 5: Make a conclusion in the context of the problem. Write down the null and alternative hypotheses and state the significance level of the test. Write down the distribution of the random variable assuming that the null hypothesis holds. Find the probability of obtaining results at least as extreme as those actually recorded – this probability is called the p-value. Compare the p-value with the significance level and decide whether to reject the null hypothesis or not.

51 Hypothesis tests on a Poisson mean
The number of accidents each year on a dangerous stretch of road historically follows a Poisson distribution with mean 18. The police install a speed camera and the local council is interested in knowing whether this will lead to a reduction in the number of accidents. In the year after the speed camera was installed, 10 accidents were recorded. Use a 5% significance level to test whether there seems to have been a reduction in the number of accidents.

52 Hypothesis tests on a Poisson mean
Let λ represent the mean number of accidents per year. No reduction in the number of accidents. Null hypothesis H0: λ = 18 Alternative hypothesis H1: λ < 18 There has been a reduction in the number of accidents. Let X be the number of accidents in a year. Under H0, X ~ Po(18). Using tables, P(X ≤ 10) = < 5% Therefore we can reject the null hypothesis. There is some evidence that there has been a reduction in the number of accidents. The number of accidents fell to 10. A reminder may be needed about the nature of the null and alternative hypotheses.

53 Examination-style question
A company has a notoriously unreliable computer system with a mean of 4.25 breakdowns each week. The company installs a new operating system and the management are keen to know whether this will have an effect on the number of breakdowns. Over the next two weeks the computer system breaks down on 11 occasions. Stating your hypotheses clearly, carry out a hypothesis test using a 2% significance level.

54 Examination-style question
Let λ represent the mean number of breakdowns per week. Null hypothesis H0: λ = 4.25 Alternative hypothesis H1: λ ≠ 4.25 Let X be the number of breakdowns in a two week period. This is a two-sided test. Under H0, X ~ Po(8.5). P(X ≥ 11) = 1 – P(X ≤ 10) = 1 – (using tables) > 1% = Therefore we cannot reject the null hypothesis. The test is 2-sided, so we compare the p-value with half the significance level. There is no evidence that there has been a change in the mean number of breakdowns.

55 Critical regions Remember that the critical region for a hypothesis test is the set of values that would lead to the rejection of the null hypothesis. A car salesman sells on average 2 new cars every day. His company asks him to change his sales strategy. The salesman records how many cars he sells over the next 7 days so that he can test whether there has been any change in how successfully he sells new cars. Find the critical region for a hypothesis test using a nominal 5% significance level. The probability of rejection in each tail should be as close as possible to 2.5%. Critical regions are sometimes referred to as rejection regions.

56 Critical regions A two-sided hypothesis test would be appropriate.
Let λ represent the mean number of cars sold per day. H0: λ = 2 H1: λ ≠ 2. If X is the number of cars sold in 7 days then under H0, X ~ Po(14). Lower tail: P(X ≤ 7) = P(X ≤ 6) = Closest to 2.5% Critical regions are sometimes referred to as rejection regions.

57 Critical regions Upper tail: P(X ≥ 22) = 1 – P(X ≤ 21)
= 1 – = Therefore the critical region is X ≤ 7 or X ≥ 22. = 1 – = Closest to 2.5% Critical regions are sometimes referred to as rejection regions.


Download ppt "A2-Level Maths: Statistics 2 for Edexcel"

Similar presentations


Ads by Google