Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Testing. A statistical Test is defined by 1.Choosing a statistic (called the test statistic) 2.Dividing the range of possible values for the.

Similar presentations


Presentation on theme: "Hypothesis Testing. A statistical Test is defined by 1.Choosing a statistic (called the test statistic) 2.Dividing the range of possible values for the."— Presentation transcript:

1 Hypothesis Testing

2 A statistical Test is defined by 1.Choosing a statistic (called the test statistic) 2.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 1.Collect the data. 2.Compute the value of the test statistic. 3.Make the Decision: If the value of the test statistic is in the Acceptance Region we decide to accept H 0. If the value of the test statistic is in the Critical Region we decide to reject H 0.

4 You can compare a statistical test to a meter Value of test statistic Acceptance Region Critical Region Critical Region

5 Value of test statistic Acceptance Region Critical Region Critical Region Accept H 0

6 Value of test statistic Acceptance Region Critical Region Critical Region Reject H 0

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 H 0 is true This describes the behaviour of the test statistic when H 0 is true

9 We then locate the critical region in the tails of the sampling distribution of the test statistic when H 0 is true The size of the critical region is chosen so that the area over the critical region is .  /2

10 This ensures that the P[type I error] = P[rejecting H 0 when true] =  The size of the critical region is chosen so that the area over the critical region is .  /2

11 To find P[type II error] = P[ accepting H 0 when false] =  we need to find the sampling distribution of the test statistic when H 0 is false  /2  sampling distribution of the test statistic when H 0 is false sampling distribution of the test statistic when H 0 is true

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 –H 0 : p = p 0 (some specified value of p) Against –H A :

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 p 0 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 (H 0 ) we will use the test statistic If H 0 is true we should expect the test statistic z to be close to zero. If H 0 is true we should expect the test statistic z to have a standard normal distribution. If H A is true we should expect the test statistic z to be different from zero.

16 The sampling distribution of z when H 0 is true: The Standard Normal distribution Accept H 0 Reject H 0

17 The Acceptance region:  /2 Accept H 0 Reject H 0

18 Acceptance Region –Accept H 0 if: Critical Region –Reject H 0 if: With this Choice

19 Summary To Test for a binomial probability p H 0 : p = p 0 (some specified value of p) Against H A : we 1.Decide on  = P[Type I Error] = the significance level of the test (usual choices 0.05 or 0.01)

20 2.Collect the data 3.Compute the test statistic 4.Make the Decision Accept H 0 if: Reject H 0 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 –H 0 : p = 0.08 (8%) Against –H A :

23 Summary 1.Decide on  = P[Type I Error] = the significance level of the test Choose (  = 0.05) 2.Collect the data The number in the sample that support the liberal party is x = 92

24 3.Compute the test statistic 4.Make the Decision Accept H 0 if: Reject H 0 if:

25 Since the test statistic is in the Critical region we decide to Reject H 0 Conclude that H 0 : p = 0.08 (8%) is false There is a significant difference (  = 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 –H 0 : (some specified value of p) Against –H A : 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 (H 0 ) we will use the test statistic If H 0 is true we should expect the test statistic z to be close to zero or negative If p = p 0 we should expect the test statistic z to have a standard normal distribution. If H A is true we should expect the test statistic z to be a positive number.

28 The sampling distribution of z when p = p 0 : The Standard Normal distribution Accept H 0 Reject H 0

29 The Acceptance and Critical region:  Accept H 0 Reject H 0

30 Acceptance Region –Accept H 0 if: Critical Region –Reject H 0 if: The Critical Region is called one-tailed With this Choice

31 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)

32 We want to test –H 0 : Against –H A :

33 Summary 1.Decide on  = P[Type I Error] = the significance level of the test Choose (  = 0.05) 2.Collect the data The number of successful operations in the sample of 200 cases is x = 187

34 3.Compute the test statistic 4.Make the Decision Accept H 0 if: Reject H 0 if:

35 Since the test statistic is in the Acceptance region we decide to Accept H 0 There is a no significant (  = 5%) increase in the success rate of the new procedure over the older procedure Conclude that H 0 : is true

36 Comments When the decision is made to accept H 0 is made it should not be conclude that we have proven H 0. This is because when setting up the test we have not controlled  = P[type II error] = P[accepting H 0 when H 0 is FALSE] Whenever H 0 is accepted there is a possibility that a type II error has been made.

37 In the last example The conclusion that there is a no significant (  = 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

38 An analogy – a jury trial The two possible decisions are –Declare the accused innocent. –Declare the accused guilty.

39 The null hypothesis (H 0 ) – the accused is innocent The alternative hypothesis (H A ) – the accused is guilty

40 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

41 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.

42 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

43 Value of test statistic Acceptance Region Critical 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 wrong

44 The z-test for the Mean of a Normal Population We want to test, , denote the mean of a normal population

45 Situation A success-failure experiment has been repeated n times The probability of success p is unknown. We want to test –H 0 : p = p 0 (some specified value of p) Against –H A :

46 The Data Let x 1, x 2, x 3, …, x n denote a sample from a normal population with mean  and standard deviation . Let we want to test if the mean, , is equal to some given value  0. Obviously if the sample mean is close to  0 the Null Hypothesis should be accepted otherwise the null Hypothesis should be rejected.

47 The Test Statistic To decide to accept or reject the Null Hypothesis (H 0 ) we will use the test statistic If H 0 is true we should expect the test statistic z to be close to zero. If H 0 is true we should expect the test statistic z to have a standard normal distribution. If H A is true we should expect the test statistic z to be different from zero.

48 The sampling distribution of z when H 0 is true: The Standard Normal distribution Accept H 0 Reject H 0

49 The Acceptance region:  /2 Accept H 0 Reject H 0

50 Acceptance Region –Accept H 0 if: Critical Region –Reject H 0 if: With this Choice

51 Summary To Test for a binomial probability p H 0 :  =  0 (some specified value of p) Against H A : 1.Decide on  = P[Type I Error] = the significance level of the test (usual choices 0.05 or 0.01)

52 2.Collect the data 3.Compute the test statistic 4.Make the Decision Accept H 0 if: Reject H 0 if:

53 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:

54 We want to test: Manufacturers claim is correct against Manufacturers claim is not correct

55 The Test Statistic

56 The Critical Region and Acceptance Region Using  = 0.05 We accept H 0 if -1.960 ≤ z ≤ 1.960 z  /2 = z 0.025 = 1.960 reject H 0 if z 1.960

57 The Decision Since z= -2.75 < -1.960 We reject H 0 Conclude: the manufacturers’s claim is incorrect:


Download ppt "Hypothesis Testing. A statistical Test is defined by 1.Choosing a statistic (called the test statistic) 2.Dividing the range of possible values for the."

Similar presentations


Ads by Google