Presentation is loading. Please wait.

Presentation is loading. Please wait.

Math 4030 – 9a Introduction to Hypothesis Testing

Similar presentations


Presentation on theme: "Math 4030 – 9a Introduction to Hypothesis Testing"— Presentation transcript:

1 Math 4030 – 9a Introduction to Hypothesis Testing
Research Problem  Hypothesis Experiments  Data Collection Report the results (Reject the Hypothesis?) Data Analysis  Hypothesis Testing

2 The first example: A paint manufacturer claims that the average drying time of his new “fast-drying” paint is 20 minutes. The consumer protection agency wants to know if this is true gallon cans of such paint are collected and tested. The sample results the sample mean of minutes. What should we do with manufacturer’s claim? We assume that the drying time has normal distribution with SD = 2.4 min.

3 How does Hypothesis Testing work?
Assume the claim is true Sample mean is random Difference Distribution of sample means Probability of having such difference (error)

4 Sample mean distribution (from a sample of size 36)
or  = 20

5 Confidence Interval Approach:
With sample of size 36, the maximum error for 95% confidence interval is: With probability 0.95, the true population mean is in the interval 20.85 – E <  < E or <  < But we see the hypothesized population mean is outside this interval. Hypothesis is not likely true!

6 Critical Region Approach:
If the hypothesis is true ( = 20), sample mean (or size 36) should have a normal distribution with mean 20 and standard deviation 2.4/6 = 0.4. Sample data are inconsistent with the hypothesis! Critical Region 1 -  = 0.95  = 20 20 – E = 20 + E = Sample mean Critical Values

7 P-value Approach:  = 20 Sample mean (or size 36) distribution
under the assumption  = 20 P-Value = Probability of having such a “bad sample” or even worse.  = 20 Sample mean = 20.85

8 Calculate P-value:  = 20 Sample mean = 20.85 P-Value = Probability of having such a “bad sample” or even worse. The probability of having a sample this much different from the population is SMALL!

9 Confidence Interval Method
Null Hypothesis:  = 20 (min) Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Find the 95% confidence interval for population mean using sample mean: Conclusion: the population mean assumed in the null hypothesis does not fall in this confidence interval. Null hypothesis should be rejected. 20.85 – E <  < E <  <

10 Critical Region Method
Null Hypothesis:  = 20 (min) Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Critical region for Z-score: Statistic from the sample: Conclusion: Sample statistic falls in the critical region, the null hypothesis should be rejected.

11 P-Value Method Null Hypothesis:  = 20 (min)
Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Statistics: P-Value: Conclusion: the P-value is less than 0.05, the null hypothesis should be rejected. .

12 When the null hypothesis is rejected, what do we say?
“We have enough evidence to reject the claim that the average drying time of the paint is 20 min. (The proposed alternative is that the average drying time is not 20 min.)” Three methods will lead to the same decision (reject or not reject the null hypothesis.) Advantages of using each…

13 Confidence Interval Method
Null Hypothesis:  = 20 (min) Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Find the 95% confidence interval for population mean using sample mean: Conclusion: the population mean assumed in the null hypothesis does not fall in this confidence interval. Null hypothesis should be rejected. When the null hypothesis gets rejected, a confidence interval for the true population mean is presented. 20.85 – E <  < E <  <

14 Critical Region Method
Null Hypothesis:  = 20 (min) Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Critical region for Z-score: Statistic from the sample: Conclusion: Sample statistic falls in the critical region, the null hypothesis should be rejected. Critical values for the sample mean can give a guideline for future sampling.

15 P-Value Method Null Hypothesis:  = 20 (min) Alternative hypothesis:   20 (min) Level of significance:  = 0.05 Statistics: P-Value: Conclusion: the P-value is less than 0.05, the null hypothesis should be rejected. The null hypothesis is rejected at  = 0.05 level, but not at 0.01 level.

16 What affect our decision of whether or not to reject the null hypothesis? And how?
Difference between what is assumed in the null hypothesis and what we find from the sample data; The variance (variability/stability) of the population (in our study); Level of significance; Sample size; Statistical testing method we choose.

17 Basic Elements in Hypothesis Testing (Sec. 7.4):
Null hypothesis and Alternative hypothesis; Level of significance ; Tail(s) of the test; Sample statistic(s) and distribution(s); Conclusion about the null hypothesis based on the sample statistic(s) Confidence Interval Critical region(s) P-value Conclusion for your research report Errors in Hypothesis Testing

18 Null Hypothesis vs. Alternative Hypothesis (Sec. 7.5)
The Null hypothesis, denoted by H0, is set up as an assumption that the distribution of the sample statistic(s) will be based on; To begin the test, we always assume that the null hypothesis is true; When we see an “significant” inconsistency between the null hypothesis and the “evidence” from the data, we reject the null hypothesis. The objective of the hypothesis testing is to see whether we can reject the null hypothesis.

19 Null Hypothesis vs. Alternative Hypothesis
The Alternative hypothesis, denoted by H1, is set up as an alternative assumption when the null hypothesis is declared false; To start with, we assume that the null hypothesis is true; When the null hypothesis is rejected, we will present the alternative hypothesis; It is the alternative hypothesis that the researcher usually wants to present, so alternative hypothesis is also called researcher’s hypothesis.

20 Level of Significance :
Common choices for level of significance : 0.1, 0.05, 0.01, 0.001 Rules that  plays in the hypothesis testing; 1 - : confidence;  relate to probability of making certain error;

21 One-Tail vs. Two-Tail test:
When to use one-tail test? Advantage of using one-tail test. What to watch for?

22 Sample statistics and distributions:
Null hypothesis gives assumed values for the population parameters; If the null hypothesis is true, then the sample statistic(s) should follow certain distribution; Compare the sample statistic(s) distribution and the observed values from the sample data; If there is too much of the discrepancy, then the null hypothesis will be rejected.

23 Conclusion of the Hypothesis Testing:

24 Confidence Interval Method
If the null hypothesis is rejected, we say If the null hypothesis is not rejected, we say Since the assumed population parameter (mean, etc.) does not fall in the confidence interval generated from the sample data, we reject the null hypothesis that … Since the assumed population parameter (mean, etc.) falls in the confidence interval generated from the sample data, we do not reject the null hypothesis that …

25 Critical Region Method
If the null hypothesis is rejected, we say If the null hypothesis is not rejected, we say Since the sample statistic(s) fall(s) in the critical region, we reject the null hypothesis that ….. Since the sample statistic(s) does not fall(s) in the critical region, we do not reject the null hypothesis that …..

26 P-value Method If the null hypothesis is rejected, we say If the null hypothesis is not rejected, we say Since P-value is less than  = 0.05 (for example), we reject the null hypothesis that … Since P-value is greater than  = 0.05 (for example), we do not reject the null hypothesis that …

27 How do we address researcher’s initial objective?

28 Research Objective: A company wants to establish that the mean life of its batteries, when used in a wireless mouse, is over 183 days. Null hypothesis H0: Alternative hypothesis H1: (Researcher’s Claim)

29 A company wants to establish that the mean life of its batteries, when used in a wireless mouse, is over 183 days. Null hypothesis H0: Alternative hypothesis H1: (Researcher’s Claim) If H0 is rejected we say: Since …. the null hypothesis is reject, we support the claim that the mean life of its batteries, when used in a wireless mouse, IS over 183 days. If H0 is not rejected we say: Since …. the null hypothesis is not reject, we do not have enough evidence to support the claim that the mean life of its batteries, when used in a wireless mouse, is over 183 days.

30 Research Objective: Null hypothesis H0: Alternative hypothesis H1:
A company claims that the mean life of its batteries, when used in a wireless mouse, is over 183 days. A consumer wants to argue that the actual battery life is no longer than 183 days. Null hypothesis H0: (Researcher’s Claim) Alternative hypothesis H1:

31 A company claims that the mean life of its batteries, when used in a wireless mouse, is over 183 days. A consumer wants to argue that the actual battery life is no longer than 183 days. (Researcher’s Claim) Null hypothesis H0: Alternative hypothesis H1: If H0 is rejected we say: Since …. the null hypothesis is reject, we reject the claim that the mean life of its batteries is no longer than 183 days. If H0 is not rejected we say: Since …. the null hypothesis is not reject, we do not have enough evidence to reject the claim that the mean life of its batteries is no longer than 183 days.

32 Comments: When the null hypothesis is rejected, we can support the alternative hypothesis --- Action! When the null hypothesis is not rejected, there are many reasons. Null hypothesis is false is just one of many. So we say: we don’t have enough evidence to…. Rejecting null hypothesis is the purpose of the hypothesis testing. Ability of rejecting a false null hypothesis will be called the power of a test.

33 Errors in hypothesis testing:
H0 is true H0 is false Reject H0 Type I error (Probability  ) No error Fail to reject H0 Type II error (Probability  )

34 Errors in hypothesis testing:
 is the probability of making Type I error (of rejecting a true null hypothesis); this is the same  we set as the level of significance;  is the probability of making Type II error (of not rejecting a false null hypothesis); 1 -  is the probability of rejecting a false null hypothesis, called the power of the test. Relationship between  and ; Choose  will effect the power of the test.

35 Type II error (with probability  )
H0 is true H0 is false Reject H0 Type I error (with probability  ) No error Fail to reject H0 Type II error (with probability  ) The actual drying time is not 20 min The actual drying time is 20 min Mistakenly accuse the manufacturer and hurt the business Claim that the actual drying time is not 20 min Be quiet toward the business and hurt the consumers Fail to detect that the actual drying time is not 20 min

36 Type II error (with probability  )
H0 is true H0 is false Reject H0 Type I error (with probability  ) No error Fail to reject H0 Type II error (with probability  ) No cancer Cancer exists False positive: patient undergo unnecessary treatments Test positive: Claim that there is cancer False negative: miss the opportunity for needed treatments Test negative: Claim that there is no cancer


Download ppt "Math 4030 – 9a Introduction to Hypothesis Testing"

Similar presentations


Ads by Google