1232020 Hypothesis Testing An Example Hypothesis Testing situation

  • Slides: 14
Download presentation
12/3/2020 Hypothesis Testing - An Example Hypothesis Testing situation n Sid says that he

12/3/2020 Hypothesis Testing - An Example Hypothesis Testing situation n Sid says that he has psychic powers and can read people’s thoughts. To test this claim, a volunteer from the audience sits on the stage while Sid sits in a separate room off stage. The volunteer chooses a card from a wellshuffled pack and concentrates on the card for five seconds. At the same time, Sid writes down the suit of the card, either hearts, diamonds, spades or clubs. The card is replaced in the pack, the pack is shuffled another card is drawn. The procedure is repeated until 20 cards have been drawn.

12/3/2020 Continued n There are four suits, so Sid has a one in four

12/3/2020 Continued n There are four suits, so Sid has a one in four chance of writing down the correct suit if he guesses the answer. If he isn’t guessing, you would expect him to get more than one in four correct. So if he gets five (or fewer) correct answers out of 20, you would definitely say that he is just guessing but if he gets as many as 19 or 20 correct you would have no hesitation in saying that he could read people’s thoughts.

12/3/2020 Null & Alternative Hypotheses n n n Whenever we do a Statistical test

12/3/2020 Null & Alternative Hypotheses n n n Whenever we do a Statistical test we put forward a hypothesis. Null Hypothesis H 0 – the initial assumption that we want to test, shown mathematically. So for our example: We’re assuming that Sid is not psychic. Therefore the proportion of suits we expect him to get right is ¼ or 0. 25. So we say H 0 : p = 0. 25

12/3/2020 Null & Alternative Hypotheses n We can show that our assumption is right

12/3/2020 Null & Alternative Hypotheses n We can show that our assumption is right or wrong using an alternative Hypothesis H 1 n So for our example: The alternative Hypothesis is that Sid is not guessing and therefore he should get more than 1 in 4 correct. Therefore: H 1 : p > 0. 25 n n

12/3/2020 One- & Two-Tailed Tests n If in our Alternative Hypothesis (H 1) we

12/3/2020 One- & Two-Tailed Tests n If in our Alternative Hypothesis (H 1) we require the value to be greater than or less than the Null Hypothesis (H 0) then we are doing a one-tailed test (i. e. the upper tail or the lower tail of the distribution respectively). n If we require the H 1 value to be not equal to the H 0 value then we are doing a two-tailed test.

12/3/2020 Example n If the null hypothesis stated that the proportion of boys in

12/3/2020 Example n If the null hypothesis stated that the proportion of boys in school is 0. 5 what would be a suitable alternative hypothesis? Would this be a one or two tailed test?

12/3/2020 The p-value Once H 0 and H 1 have been set up we

12/3/2020 The p-value Once H 0 and H 1 have been set up we need to calculate the test statistic, T, upon which we decide whether to accept or reject the null hypothesis. n The p-value tells us how likely or unlikely it is that the test statistic is true. n

12/3/2020 n Given the observed value t of the test statistic (T) the p-value

12/3/2020 n Given the observed value t of the test statistic (T) the p-value is the probability that T will have a value at least as extreme as t if H 0 is true.

12/3/2020 Evidence to accept/reject p-value > 0. 05 0. 01 < p-value < 0.

12/3/2020 Evidence to accept/reject p-value > 0. 05 0. 01 < p-value < 0. 05 Not sufficient evidence for rejecting H 0 Strong evidence for rejecting H 0 0. 001 < p-value < 0. 01 Very strong evidence for rejecting H 0 P-value < 0. 001 Overwhelming evidence

12/3/2020 Testing the mean of a distribution Example 1 n The breaking strength of

12/3/2020 Testing the mean of a distribution Example 1 n The breaking strength of nylon cord (kg) is distributed: 25 modified cords are produced and X = 10. 4 kg n Test the Hypothesis that modifications will not change the mean breaking strength. n

12/3/2020 Example 2 n In 1985 the heights of policemen were distributed: In 1995

12/3/2020 Example 2 n In 1985 the heights of policemen were distributed: In 1995 the question asked was ‘Is the average height of a policeman now different to 1985? ’ n A sample of 60 were measured and the mean was found to be 182. 5 cm. n Answer the question posed. n

Testing a probability / proportion (Binomial) 1. A manufacturer of seeding compost claims seeds

Testing a probability / proportion (Binomial) 1. A manufacturer of seeding compost claims seeds sown in his compost have a higher germination rate than ordinary compost. Seeds in the ordinary compost have a germination rate of 70%. To test the manufacturer’s claim a sample of 20 seeds was planted in the new compost. 18 of these seeds germinated. Test the manufacturer’s claim.

Testing a probability / proportion (Binomial) 2. A supermarket claimed that 25% of customers

Testing a probability / proportion (Binomial) 2. A supermarket claimed that 25% of customers pay by credit card. Test the claim in the following cases: a. b. In a 50 customer sample, 9 paid by credit card. In a 160 customer sample, 28 paid by credit card.

Testing the mean of a Poisson Distribution 1. The number of vehicles requiring assistance

Testing the mean of a Poisson Distribution 1. The number of vehicles requiring assistance per day on a motorway has a Poisson distribution with mean 0. 5. It was suggested that the mean will be greater on wet days. Test the suggestion in the following: a. b. On 10 wet days a total of 9 required assistance. On 55 wet days a total of 40 required assistance.