You are on page 1of 14

27/02/23

Hypothesis Testing - An Example


Hypothesis Testing situation
 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
well-shuffled 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
and another card is drawn. The procedure is
repeated until 20 cards have been drawn.
27/02/23

Continued
 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.
27/02/23

Null & Alternative Hypotheses


 Whenever we do a Statistical test we put
forward a hypothesis.
 Null Hypothesis H0 – 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 H0 : p = 0.25
27/02/23

Null & Alternative Hypotheses


 We can show that our assumption is
right or wrong using an alternative
Hypothesis H1

 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:
 H1 : p > 0.25
27/02/23

One- & Two-Tailed Tests


 If in our Alternative Hypothesis (H1) we
require the value to be greater than or
less than the Null Hypothesis (H0) then
we are doing a one-tailed test (i.e. the
upper tail or the lower tail of the
distribution respectively).

 If we require the H1 value to be not


equal to the H0 value then we are doing
a two-tailed test.
27/02/23

Example
 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?
27/02/23

The p-value
 Once H0 and H1 have been set up we
need to calculate the test statistic,
T, upon which we decide whether to
accept or reject the null hypothesis.
 The p-value tells us how likely or
unlikely it is that the test statistic is
true.
27/02/23

 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 H0 is true.
27/02/23

Evidence to accept/reject
p-value > 0.05 Not sufficient
evidence for
rejecting H0
0.01 < p-value < 0.05 Strong evidence for
rejecting H0
0.001 < p-value < 0.01 Very strong
evidence for
rejecting H0
P-value < 0.001 Overwhelming
evidence
27/02/23

Testing the mean of a distribution


Example 1
 The breaking strength of nylon cord
(kg) is distributed:

 25 modified cords are produced and


X = 10.4kg
 Test the Hypothesis that
modifications will not change the
mean breaking strength.
27/02/23

Example 2
 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?’
 A sample of 60 were measured and
the mean was found to be 182.5cm.
 Answer the question posed.
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 pay by credit card.
Test the claim in the following
cases:
a. In a 50 customer sample, 9 paid by
credit card.
b. In a 160 customer sample, 28 paid by
credit card.
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. On 10 wet days a total of 9 required
assistance.
b. On 55 wet days a total of 40 required
assistance.

You might also like