Download presentation
Presentation is loading. Please wait.
1
Hypothesis Testing
2
A statistical Test is defined by
Choosing a statistic (called the test statistic) Dividing the range of possible values for the test statistic into two parts The Acceptance Region The Critical Region
3
To perform a statistical Test we
Collect the data. Compute the value of the test statistic. Make the Decision: If the value of the test statistic is in the Acceptance Region we decide to accept H0 . If the value of the test statistic is in the Critical Region we decide to reject H0 .
4
You can compare a statistical test to a meter
Value of test statistic Acceptance Region Critical Region Critical Region Critical Region is the red zone of the meter
5
Accept H0 Value of test statistic Acceptance Region Critical Critical
6
Reject H0 Acceptance Region Value of test statistic Critical Critical
7
Acceptance Region Critical Region Sometimes the critical region is located on one side. These tests are called one tailed tests.
8
Once the test statistic is determined, to set up the critical region we have to find the sampling distribution of the test statistic when H0 is true This describes the behaviour of the test statistic when H0 is true
9
We then locate the critical region in the tails of the sampling distribution of the test statistic when H0 is true a /2 a /2 The size of the critical region is chosen so that the area over the critical region is a.
10
This ensures that the P[type I error] = P[rejecting H0 when true] = a
The size of the critical region is chosen so that the area over the critical region is a.
11
To find P[type II error] = P[ accepting H0 when false] = b, we need to find the sampling distribution of the test statistic when H0 is false sampling distribution of the test statistic when H0 is false sampling distribution of the test statistic when H0 is true b a /2 a /2
12
The z-test for Proportions
Testing the probability of success in a binomial experiment
13
Situation A success-failure experiment has been repeated n times
The probability of success p is unknown. We want to test H0: p = p0 (some specified value of p) Against HA:
14
The Data The success-failure experiment has been repeated n times
The number of successes x is observed. Obviously if this proportion is close to p0 the Null Hypothesis should be accepted otherwise the null Hypothesis should be rejected.
15
The Test Statistic To decide to accept or reject the Null Hypothesis (H0) we will use the test statistic If H0 is true we should expect the test statistic z to be close to zero. If H0 is true we should expect the test statistic z to have a standard normal distribution. If HA is true we should expect the test statistic z to be different from zero.
16
The Standard Normal distribution
The sampling distribution of z when H0 is true: The Standard Normal distribution Reject H0 Accept H0
17
The Acceptance region:
Reject H0 Accept H0
18
Acceptance Region Critical Region With this Choice Accept H0 if:
Reject H0 if: With this Choice
19
Summary To Test for a binomial probability p
H0: p = p0 (some specified value of p) Against HA: we Decide on a = P[Type I Error] = the significance level of the test (usual choices 0.05 or 0.01)
20
Collect the data Compute the test statistic Make the Decision Accept H0 if: Reject H0 if:
21
Example In the last election the proportion of the voters who voted for the Liberal party was 0.08 (8 %) The party is interested in determining if that percentage has changed A sample of n = 800 voters are surveyed
22
We want to test H0: p = 0.08 (8%) Against HA:
23
Summary Decide on a = P[Type I Error] = the significance level of the test Choose (a = 0.05) Collect the data The number in the sample that support the liberal party is x = 92
24
Compute the test statistic
Make the Decision Accept H0 if: Reject H0 if:
25
Since the test statistic is in the Critical region we decide to Reject H0
Conclude that H0: p = 0.08 (8%) is false There is a significant difference (a = 5%) in the proportion of the voters supporting the liberal party in this election than in the last election
26
The one tailed z-test A success-failure experiment has been repeated n times The probability of success p is unknown. We want to test H0: (some specified value of p) Against HA: The alternative hypothesis is in this case called a one-sided alternative
27
The Test Statistic To decide to accept or reject the Null Hypothesis (H0) we will use the test statistic If H0 is true we should expect the test statistic z to be close to zero or negative If p = p0 we should expect the test statistic z to have a standard normal distribution. If HA is true we should expect the test statistic z to be a positive number.
28
The Standard Normal distribution
The sampling distribution of z when p = p0 : The Standard Normal distribution Reject H0 Accept H0
29
The Acceptance and Critical region:
Reject H0 Accept H0
30
Acceptance Region Critical Region Using the meter analogy a one tailed test is similar to a meter which has the red zone located entirely on one side
31
The Critical Region is called one-tailed With this Choice
Acceptance Region Accept H0 if: Critical Region Reject H0 if: The Critical Region is called one-tailed With this Choice
32
Example A new surgical procedure is developed for correcting heart defects infants before the age of one month. Previously the procedure was used on infants that were older than one month and the success rate was 91% A study is conducted to determine if the success rate of the new procedure is greater than 91% (n = 200)
33
We want to test H0: Against HA:
34
Summary Decide on a = P[Type I Error] = the significance level of the test Choose (a = 0.05) Collect the data The number of successful operations in the sample of 200 cases is x = 187
35
Compute the test statistic
Make the Decision Accept H0 if: Reject H0 if:
36
Since the test statistic is in the Acceptance region we decide to Accept H0
Conclude that H0: is true There is a no significant (a = 5%) increase in the success rate of the new procedure over the older procedure
37
Comments When the decision is made to accept H0 is made it should not be conclude that we have proven H0. This is because when setting up the test we have not controlled b = P[type II error] = P[accepting H0 when H0 is FALSE] Whenever H0 is accepted there is a possibility that a type II error has been made.
38
In the last example The conclusion that there is a no significant (a = 5%) increase in the success rate of the new procedure over the older procedure should be interpreted: We have been unable to proof that the new procedure is better than the old procedure
39
An analogy – a jury trial
The two possible decisions are Declare the accused innocent. Declare the accused guilty.
40
The null hypothesis (H0) – the accused is innocent
The alternative hypothesis (HA) – the accused is guilty
41
The two possible errors that can be made:
Declaring an innocent person guilty. (type I error) Declaring a guilty person innocent. (type II error) Note: in this case one type of error may be considered more serious
42
Requiring all 12 jurors to support a guilty verdict :
Ensures that the probability of a type I error (Declaring an innocent person guilty) is small. However the probability of a type II error (Declaring an guilty person innocent) could be large.
43
Hence: When decision of innocence is made:
It is not concluded that innocence has been proven but that we have been unable to disprove innocence
44
Value of test statistic
Acceptance Region Critical Region In the meter analogy, if the needle is in the acceptance region but close to the critical region then this does not prove that nothing is abnormal
45
The z-test for the Mean of a Normal Population
We want to test, m, denote the mean of a normal population
46
The situation Data will be coming from a normal population with mean m and standard deviation s. we want to test if the mean, m, is equal to some given value m0.
47
The Data Let x1, x2, x3 , … , xn denote a sample from a normal population with mean m and standard deviation s. Let we want to test if the mean, m, is equal to some given value m0. Obviously if the sample mean is close to m0 the Null Hypothesis should be accepted otherwise the null Hypothesis should be rejected.
48
The Test Statistic To decide to accept or reject the Null Hypothesis (H0) we will use the test statistic If H0 is true we should expect the test statistic z to be close to zero. If H0 is true we should expect the test statistic z to have a standard normal distribution. If HA is true we should expect the test statistic z to be different from zero.
49
The Standard Normal distribution
The sampling distribution of z when H0 is true: The Standard Normal distribution Reject H0 Accept H0
50
The Acceptance region:
Reject H0 Accept H0
51
Acceptance Region Critical Region With this Choice Accept H0 if:
Reject H0 if: With this Choice
52
Summary To Test the mean m of a Normal population
H0: m = m0 (some specified value of m) Against HA: Decide on a = P[Type I Error] = the significance level of the test (usual choices 0.05 or 0.01)
53
Collect the data Compute the test statistic Make the Decision Accept H0 if: Reject H0 if:
54
Example A manufacturer Glucosamine capsules claims that each capsule contains on the average: 500 mg of glucosamine To test this claim n = 40 capsules were selected and amount of glucosamine (X) measured in each capsule. Summary statistics:
55
We want to test: Manufacturers claim is correct against Manufacturers claim is not correct
56
The Test Statistic
57
The Critical Region and Acceptance Region
Using a = 0.05 za/2 = z0.025 = 1.960 We accept H0 if ≤ z ≤ 1.960 reject H0 if z < or z > 1.960
58
The Decision Since z= -2.75 < -1.960 We reject H0
Conclude: the manufacturers’s claim is incorrect:
59
The one tailed z-test for the Mean of a Normal Population
This test is used when the Alternative Hypothesis is one sided
60
The situation We want to test
The alternative hypothesis is sometimes called the research Hypothesis It coincides with the hypothesis what the researcher is trying to prove
61
The Test Statistic To decide to accept or reject the Null Hypothesis (H0) we will use the test statistic
62
The critical region If we are testing
The alternative hypothesis is sometimes called the research Hypothesis It coincides with the hypothesis what the researcher is trying to prove
63
The critical region If we are testing Reject H0 if z > za a za
64
If we are testing Reject H0 if z < -za a -za
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.