Presentation is loading. Please wait.

Presentation is loading. Please wait.

Statistical Inference

Similar presentations


Presentation on theme: "Statistical Inference"— Presentation transcript:

1 Statistical Inference
Hypothesis Testing Reference: Basic Business Statistics - Concepts and Applications, 10th edition, by Mark Berenson. Prentice Hall.

2 Learning Objectives The basic principles of hypothesis testing
How to use hypothesis testing to test about a population mean or proportion The assumptions of hypothesis-testing procedure, how to evaluate them, and the consequences if they are seriously violated How to avoid the pitfalls involved in hypothesis testing The ethical issues involved in hypothesis testing

3 What is a Hypothesis? A hypothesis is a claim (assumption) about a
population (parameter) population mean population proportion Example: The mean monthly cell phone bill in this city is μ = $32 Example: The proportion of adults in this city with 4G cell phones is π = 0.38

4 The Null Hypothesis, H0 States the claim or assertion to be tested
Example: The average number of TV sets in U.S. Homes is equal to three (H0 : μ = 3) A hypothesis is about a population parameter, not about a sample statistic!

5 The Null Hypothesis, H0 (continued) We begin with the assumption that the null hypothesis is true Similar to the notion of “innocent until proven guilty” Refers to the assumed state of affairs When it is about a parameter it always contains “=” , “≤” or “” sign The decision will be to reject or not to reject H0

6 The Alternative Hypothesis, H1
It is the opposite of the null hypothesis e.g., The average number of TV sets in U.S. homes is not equal to 3 ( H1: μ ≠ 3 ) It challenges the assumed state of affairs It contains the complement of the “=” , “≤” or “” sign used in H0 It will be the conclusion when H0 is rejected. It is generally the hypothesis that the researcher is trying to prove

7 Hypothesis Testing Process
Claim: the mean IQ level of the students in a large school is 110 (Null Hypothesis: Population H0: μ = 110 ) Now select a random sample X Is = 95 likely if μ = 110 or more? Suppose the sample If not likely, REJECT mean age is 95: X = 95 Sample Null Hypothesis

8 ... then we reject the null hypothesis that μ = 110.
Reason for Rejecting H0 Sampling Distribution of X X 95 μ = 110 If H0 is true ... then we reject the null hypothesis that μ = 110. If it is unlikely that we would get a sample mean of this value ... ... if in fact this were the population mean…

9 Level of Significance, 
Defines the probability of the unlikely values of the sample statistic if the null hypothesis is true Is used to define the rejection region of the sampling distribution Is designated by  , (level of significance) Typical values are 0.01, 0.05, or 0.10 Is selected by the researcher at the beginning Provides the critical value(s) of the test

10 Level of Significance and the Rejection Region
Represents critical value a a H0: μ = 3 H1: μ ≠ 3 /2 /2 Rejection region is shaded Two-tail test H0: μ ≤ 3 H1: μ > 3 a Upper-tail test H0: μ ≥ 3 H1: μ < 3 Rejection region is shaded a Lower-tail test

11 Errors in Making Decisions
Type I Error Reject a true null hypothesis Considered a serious type of error Similar to sending an innocent person to jail due to mistrial or false evidence. Hence the probability of a Type I Error should be small. The probability of Type I Error is  Called the level of significance of the test Typically set by the researcher in advance

12 Errors in Making Decisions
(continued) Type II Error Fail to reject a false null hypothesis Similar to setting a guilty person free due to absence of enough evidence to sentence him. The probability of Type II Error is β

13 Outcomes and Probabilities
Possible Hypothesis Test Outcomes Actual Situation Decision H0 True H0 False Do Not No error ( ) Type II Error ( β ) Reject Key: Outcome (Probability) a H Reject Type I Error ( ) No Error ( 1 - β ) H a

14 Type I & II Error Relationship
Type I and Type II errors cannot happen at the same time Type I error can only occur if H0 is true Type II error can only occur if H0 is false If Type I error probability () , then Type II error probability (β)

15 Factors Affecting Type II Error
All else equal, β when the difference between hypothesized parameter value and its true value β when  β when σ β when n

16 Hypothesis Tests for the Mean
 Known  Unknown (Z test) (t test)

17 Z Test of Hypothesis for the Mean (σ Known)
Convert sample statistic ( ) to a Z test statistic X Hypothesis Tests for   Known σ Known  Unknown σ Unknown (Z test) (t test) The test statistic is:

18 Critical Value Approach to Testing
For a two-tail test for the mean, σ known: Convert sample statistic ( ) to test statistic (Z statistic, based on the normal distribution ) Determine the critical Z values for a specified level of significance  from a table or computer Decision Rule: If the test statistic falls in the rejection region, reject H0 ; otherwise do not reject H0

19 Two-Tail Tests /2 /2 H0: μ = 105 H1: μ ¹ 105 X Z
There are two cutoff values (critical values), defining the regions of rejection /2 /2 X 105 Reject H0 Do not reject H0 Reject H0 Z -Z +Z Lower critical value Upper critical value

20 6 Steps in Hypothesis Testing
State the null hypothesis, H0 and the alternative hypothesis, H1 Choose the level of significance, , and determine the sample size, n Determine the appropriate test statistic and sampling distribution Determine the critical values that divide the rejection and nonrejection regions

21 6 Steps in Hypothesis Testing
(continued) Collect data and compute the value of the test statistic Make the statistical decision and state the managerial conclusion. If the test statistic falls into the nonrejection region, do not reject the null hypothesis H0. If the test statistic falls into the rejection region, reject the null hypothesis. Express the managerial conclusion in the context of the problem

22 Hypothesis Testing Example
Test the claim that the true mean IQ of the students in a large school is equal to 110. (Assume σ is given as 9) 1. State the appropriate null and alternative hypotheses H0: μ = H1: μ ≠ (This is a two-tail test) 2. Specify the desired level of significance and the sample size Suppose that  = 0.05 and n = 30 students are chosen at random for IQ tests.

23 Hypothesis Testing Example
(continued) 3. Determine the appropriate technique σ is known so this is a Z test. 4. Determine the critical values For  = 0.05 the critical Z values are ±1.96 5. Collect the data and compute the test statistic Suppose the IQ tests of the students in the sample are completed and the average is calculated as: X = (σ = 9 is given and n = 30) So the test statistic is:

24 Hypothesis Testing Example
(continued) 6. Is the test statistic in the rejection region?  = 0.05/2  = 0.05/2 DECISION RULE: Reject H0 if Z < or Z > 1.96; otherwise do not reject H0 Reject H0 Do not reject H0 Reject H0 -Z0.025= -1.96 +Z0.025= +1.96 Here, Z = < -1.96, so the test statistic is in the rejection region

25 Hypothesis Testing Example
(continued) 6(continued). Reach a decision and interpret the result  = 0.05/2  = 0.05/2 Reject H0 Do not reject H0 Reject H0 -Z= -1.96 +Z= +1.96 -3.16 Since Z = < -1.96, we reject the null hypothesis and conclude that there is sufficient evidence that the mean IQ level of the students in this school is not equal to 110. (It could be larger or smaller)

26 p-Value Approach to Testing
p-value: Probability of obtaining a test statistic more extreme ( ≤ or  ) than the observed sample value given H0 is true Also called the observed level of significance Smallest value of  for which H0 can be rejected

27 p-Value Approach to Testing
(continued) Convert Sample Statistic (e.g., ) to Test Statistic (e.g., Z statistic ) Obtain the p-value from a table or computer Compare the p-value with  If p-value <  , reject H0 If p-value   , do not reject H0 X

28 p-Value Example Example: How likely is it to see a sample mean of (or something further from the mean, in either direction) if the true mean is  = 110? X = is translated to a Z score of Z = -3.16 /2 = 0.025 /2 = 0.025 p-value = 2x = Z -1.96 1.96 -3.16 3.16

29 p-Value Example Compare the p-value with 
(continued) Compare the p-value with  If p-value <  , reject H0 If p-value   , do not reject H0 Here: p-value =  = 0.05 Since < 0.05, we reject the null hypothesis /2 = 0.025 /2 = 0.025 Z -1.96 1.96 -3.16 3.16

30 Connection to Confidence Intervals
For X = 104.8, σ = 9 and n = 30, a 95% confidence interval for the mean IQ  is: 101.6 ≤ μ ≤ 108.0 Since this interval does not contain the hypothesized mean value of (110), we reject the null hypothesis H0: μ = 110 at  = 0.05 level of significance. Hence, a 95% confidence interval is the set of all acceptable values of  at  = 5 % level of significance.

31 One-Tail Tests In many cases, the alternative hypothesis focuses on a particular direction This is a lower-tail test since the alternative hypothesis is focused on the lower tail below the mean of 110 H0: μ ≥ 110 H1: μ < 110 This is an upper-tail test since the alternative hypothesis is focused on the upper tail above the mean of 110 H0: μ ≤ 110 H1: μ > 110

32 Lower-Tail Tests a H0: μ ≥ 110 H1: μ < 110
There is only one critical value, since the rejection area is on one side only a Reject H0 Do not reject H0 Z -Zα μ X Critical value

33 Upper-Tail Tests a H0: μ ≤ 110
There is only one critical value, and the rejection area is on the upper tail a Do not reject H0 Reject H0 Z _ μ X Critical value

34 Example: Upper-Tail Test for Mean ( Unknown)
A pizza restaurant delivers pizza to homes within a pre-defined area. They promise free delivery if the time between order and delivery exceeds 50 minutes in this area. To be on the safe side, the manager expects the mean time between order and delivery not to exceed 40 minutes. His friend suggested that he should randomly select orders in different days and hours of the week and observe this time period to see if he is on the safe side. He wants to set this problem as a hypothesis testing problem. Can you help him?

35 Example: Upper-Tail Test for Mean ( Unknown)
State the null hypothesis, H0 and the alternative hypothesis, H1 H0: μ ≤ the mean time between order and delivery does not exceed 40 minutes H1: μ > the mean time is over 40 minutes Choose the level of significance, , and determine the sample size, n. Suppose that  = 0.10 is chosen for this test, and a sample of n = 25 pizza orders will be selected from the last week’s records.

36 Example: Find Rejection Region
(continued) Determine the appropriate test statistic and sampling distribution The test statistic would be The value of μ0 is specified by H0, n is already decided. If we knew σ, the test statistic would have the normal distribution. Since σ is not known we need to estimate it by S, the sample standard deviation. This means we have to use the t-distribution instead: with d.f. = n -1

37 Example: Find Rejection Region
(continued) 4. Determine the critical values that divide the rejection and nonrejection regions Reject H0  = 0.10 Do not reject H0 Reject H0 Critical value: t0.10 =1.318 The test statistic has t distribution with (n-1=24) degrees of freedom.

38 Example: Test Statistic
(continued) 5. Take the sample data and compute the test statistic. Suppose a sample of 25 orders yielded the following order-delivery time statistics: X = 42.5 minutes and S = 8.5 minutes Then the test statistic is:

39 Example: Upper-tail t-test
6. Reach a decision and interpret the result: Reject H0  = 0.10 Do not reject H0 Reject H0 Critical value: t0.10 =1.318 Since T = 1.47 > t0.10 =1.318, we reject H0. The average order-delivery time seems to exceed 40 minutes.

40 p -Value Solution Calculate the p-value and compare to 
(assuming that μ = 40, remember to take the value specified by H0)  = 0.10 P-value Do not reject H0 Reject H0 1.318 T = 1.47 We reject H0 since P-value <  = 0.10

41 Hypothesis Tests for Proportions
Involves categorical variables Two possible outcomes “Success” (possesses a certain characteristic) “Failure” (does not possesses that characteristic) Fraction or proportion of the population in the “success” category is denoted by π

42 Proportions Sample proportion in the success category is denoted by p
(continued) Sample proportion in the success category is denoted by p When both nπ and n(1-π) are at least 5, p can be approximated by a normal distribution with mean and standard deviation

43 Hypothesis Tests for Proportions
The sampling distribution of p is approximately normal, so the test statistic is a Z value: Hypothesis Tests for p nπ  5 and n(1-π)  5 nπ < 5 or n(1-π) < 5 Use the exact (binomial) distribution

44 Z Test for Proportion in Terms of Number of Successes
An equivalent form to the last slide, but in terms of the number of successes, X: Hypothesis Tests for X X  5 and n-X  5 X < 5 or n-X < 5 Use binomial distribution

45 Example: Z Test for Proportion
A marketing company manager claims that they receive at least 8% responses from their mailing to potential customers. To test this claim, a random sample of 500 previous mailings were surveyed. There were 25 responses for these mailings. Test at the  = 0.01 significance level. Check: n π = (500)(.08) = 40 n(1-π) = (500)(.92) = 460

46 Z Test for Proportion: Solution
Test Statistic: H0: π ≥ H1: π < 0.08 a = 0.01 n = 500, p = 0.05 Decision: Critical Value: Reject H0 at  = 0.01 Reject Conclusion: a=.01 There is sufficient evidence to reject the company’s claim of at least 8% response rate. z -2.33 Z=-2.47

47 p-Value Solution Calculate the p-value and compare to 
Do not reject H0 Reject H0 p-value =  = .01 0.0068 -2.33 Z = -2.47 Reject H0 since p-value = <  = 0.01

48 The Power of a Test Suppose we correctly reject H0: μ  52
The power of the test is the probability of correctly rejecting a false H0 Suppose we correctly reject H0: μ  52 when in fact the true mean is μ = 50 Power = 1-β 50 52 Reject H0: μ  52 Do not reject H0 : μ  52

49 Type II Error Suppose we do not reject H0:   52 when in fact the true mean is  = 50 This is the range of x where H0 is not rejected This is the true distribution of x if  = 50 Probability of type II error = β 50 52 Reject H0:   52 Do not reject H0 :   52

50 Type II Error (continued) Suppose we do not reject H0: μ  52 when in fact the true mean is μ = 50 Here, β = P( X  cutoff ) if μ = 50 β 50 52 Reject H0: μ  52 Do not reject H0 : μ  52

51 Calculating β Suppose n = 64 , σ = 6 , and  = .05
(for H0 : μ  52) So β = P( x  ) if μ = 50 50 50.766 52 Reject H0: μ  52 Do not reject H0 : μ  52

52 Calculating β and Power of the Test
(continued) Suppose n = 64 , σ = 6 , and  = 0.05 Power = 1 - β = Probability of type II error: β = 50 50.766 52 The probability of correctly rejecting a false null hypothesis is Reject H0: μ  52 Do not reject H0 : μ  52

53 Power of the Test Conclusions regarding the power of the test:
A one-tail test is more powerful than a two-tail test An increase in the level of significance () results in an increase in power An increase in the sample size results in an increase in power

54 Potential Pitfalls and Ethical Considerations
Use randomly collected data to reduce selection biases Do not use human subjects without informed consent Choose the level of significance, α, and the type of test (one-tail or two-tail) before data collection Do not employ “data snooping” to choose between one-tail and two-tail test, or to determine the level of significance Do not practice “data cleansing” to hide observations that do not support a stated hypothesis Report all pertinent findings


Download ppt "Statistical Inference"

Similar presentations


Ads by Google