Like this presentation? Why not share!

# Introduction Hypothesis Testing

## by Forum Penelitian dan Evaluasi Pendidikan on Sep 03, 2012

• 844 views

### Views

Total Views
844
Views on SlideShare
844
Embed Views
0

Likes
0
43
0

No embeds

### Categories

Uploaded via SlideShare as Microsoft PowerPoint

## Introduction Hypothesis TestingPresentation Transcript

• Chapter 8 HandoutIntroduction to Hypothesis Testing: One Population Value
• Chapter 8 SummaryHypothesis Testing for One Population Value:1. Population Mean (µ) α. σ (population standard deviation) is given (known):  Use z/standard normal/bell shaped distribution α. σ (pop std dev) is not given but s (sample std dev) is given  Use student’s t distribution2. Population proportion (π)  Use z/standard normal/bell shaped distribution3. Population variance (σ2)  Use Χ2 (Chi-Square) distribution PS: population standard deviation = σ
• What is a Hypothesis?A hypothesis is an I assume the mean GPAassumption about the of this class is 3.5!population parameter.  A parameter is a Population mean or proportion  The parameter must be identified before analysis. © 1984-1994 T/Maker Co.
• The Null Hypothesis, H0• States the Assumption (numerical) to be tested e.g. The average # TV sets in US homes is at least 3 (H0: µ ≥ 3)• Begin with the assumption that the null hypothesis is TRUE. (Similar to the notion of innocent until proven guilty) •Refers to the Status Quo •Always contains the ‘ = ‘ sign•The Null Hypothesis may or may not berejected.
• The Alternative Hypothesis, H1or HA • Is the opposite of the null hypothesis e.g. The average # TV sets in US homes is less than 3 (H1: µ < 3) • Challenges the Status Quo • Never contains the ‘=‘ sign • The Alternative Hypothesis may or may not be accepted
• Identify the ProblemSteps:  State the Null Hypothesis (H : µ ≥ 3) 0  State its opposite, the Alternative Hypothesis (H1: µ < 3) Hypotheses are mutually exclusive & exhaustive Sometimes it is easier to form the alternative hypothesis first.
• Hypothesis Testing Process Assume the population mean age is 50. (Null Hypothesis) Population The SampleIs X = 20 ≅ µ = 50? Mean Is 20 No, not likely! REJECT Null Hypothesis Sample
• Reason for Rejecting H0Sampling Distribution It is unlikely that we would ... Therefore, we get a sample reject the null mean of this hypothesis that value ... µ = 50. ... if in fact this were the population mean. 20 µ = 50 Sample Mean H0
• Level of Significance, α• Defines Unlikely Values of Sample Statistic if Null Hypothesis Is True  Called Rejection Region of Sampling Distribution• Designated α (alpha)  Typical values are 0.01, 0.05, 0.10• Selected by the Researcher at the Start• Provides the Critical Value(s) of the Test
• Level of Significance, α and the Rejection Region αH0: µ ≥ 3 CriticalH1: µ < 3 Value(s) Rejection 0 Regions αH0: µ ≤ 3H1: µ > 3 0 α /2H0: µ = 3H1: µ ≠ 3 0
• Errors in Making Decisions• Type I Error  Reject True Null Hypothesis  Has Serious Consequences  Probability of Type I Error Is α  Called Level of Significance• Type II Error  Do Not Reject False Null Hypothesis  Probability of Type II Error Is β (Beta)
• Result Possibilities H0: Innocent Jury Trial Hypothesis Test Actual Situation Actual SituationVerdict Innocent Guilty Decision H0 True H0 False Do Not Type IIInnocent Correct Error Reject 1-α Error (β ) H0 Type I PowerGuilty Error Correct Reject Error H0 (1 - β) (α )
• α & β Have an Inverse Relationship Reduce probability of one error and the other one goes up. βα
• Factors Affecting Type II Error, β• True Value of Population Parameter  Increases When Difference Between Hypothesized Parameter & True Value Decreases• Significance Level α β  Increases When α Decreases α• Population Standard Deviation σ σ β  Increases When σ Increases• Sample Size n β  Increases When n Decreases n
• 3 Methods for Hypotheses TestsRefer to Figure 8-6 (page 299) for a hypothesis test for means (µ) with σ (pop. std. dev.) is given:Method 1: Comparing Xα (X critical) with XMethod 2: Z test, i.e., comparing Zα (Ζ critical) with Z (or Z statistics or Z calculated)Method 3: Comparing α (significance level) with p-valueYou can modify those three methods for other cases. For example, if σ is unknown, you must use student’s t distribution. If you would like to use Method 2, please compare t α (t critical) with t (or t statistics or t calculated). Refer to Figure 8-8 (page 303).
• You always get:• Zα (Ζ critical) from Z distribution• tα (t critical) from student’s t distribution• .Χ2α (Χ2critical) from Χ2distributionYou always get:• Z or Z calculated or Z statistics from sample (page 299 and Figure 8-6)• t or t calculated or t statistics from sample (Figure 8-8, page 299)• .Χ2 or Χ2 calculated or Χ2 statistics from sample (Figure 8-19, page 322)
• Z-Test Statistics (σ Known)• Convert Sample Statistic (e.g., X ) to Standardized Z Variable X − µX X − µ Z= = Test Statistic σX σ n• Compare to Critical Z Value(s)  If Z test Statistic falls in Critical Region, Reject H0; Otherwise Do Not Reject H0
• p Value Test• Probability of Obtaining a Test Statistic More Extreme (≤ or ≥) than Actual Sample Value Given H0 Is True• Called Observed Level of Significance  Smallest Value of a H0 Can Be Rejected• Used to Make Rejection Decision  If p value ≥ α, Do Not Reject H0  If p value < α, Reject H0
• Hypothesis Testing: StepsTest the Assumption that the true mean # of TV sets in US homes is at least 3.1. State H0 H0 : µ ≥ 32. State H1 H1 : µ < 33. Choose α α = .054. Choose n n = 1005. Choose Method: Z Test (Method 2)
• Hypothesis Testing: Steps (continued) Test the Assumption that the average # of TV sets in US homes is at least 3. 6. Set Up Critical Value(s) Z = -1.645 7. Collect Data 100 households surveyed 8. Compute Test Statistic Computed Test Stat.= -2 9. Make Statistical Decision Reject Null Hypothesis10. Express Decision The true mean # of TV set is less than 3 in the US households.
• One-Tail Z Test for Mean (σ Known)• Assumptions  Population Is Normally Distributed  If Not Normal, use large samples  Null Hypothesis Has =, ≤, or ≥ Sign Only• Z Test Statistic: x − µx x −µ z= = σx σ n
• Rejection Region H0: µ ≥ 0 H0: µ ≤ 0 H1: µ < 0 H1: µ > 0Reject H0 Reject H 0 α α 0 Z 0 Z Must Be Significantly Small values don’t contradict H0 Below µ = 0 Don’t Reject H0!
• Example: One Tail TestDoes an average box ofcereal contain more than368 grams of cereal? Arandom sample of 25 boxes _showed X = 372.5. The 368 gm.company has specified σ tobe 15 grams. Test at the H0:α=0.05 level. µ ≤ 368 H1: µ > 368
• Finding Critical Values: One Tail Standardized NormalWhat Is Z Given α = 0.05? Probability Table (Portion) .50 -.05 σZ = 1 Z .04 .05 .06 .45 1.6 .4495 .4505 .4515 α = .05 1.7 .4591 .4599 .4608 0 1.645 Z 1.8 .4671 .4678 .4686 Critical Value 1.9 .4738 .4744 .4750 = 1.645
• Example Solution: One TailH0: µ ≤ 368 Test Statistic:H1: µ > 368 X −µα = 0.025 Z= = 1.50n = 25 σ nCritical Value: 1.645 Decision: Reject Do Not Reject Ho at α = .05 .05 Conclusion: No Evidence True Mean 0 1.645 Z Is More than 368
• p Value Solution p Value is P(Z ≥ 1.50) = 0.0668Use thealternative p Value 1.0000hypothesis .0668to find the - .9332direction of .0668the test. .9332 0 1.50 Z From Z Table: Z Value of Sample Lookup 1.50 Statistic
• p Value Solution(p Value = 0.0668) ≥ (α = 0.05). Do Not Reject. p Value = 0.0668 Reject α = 0.05 0 1.50 Z Test Statistic Is In the Do Not Reject Region
• Example: Two Tail TestDoes an average box ofcereal contains 368 grams ofcereal? A random sample of25 boxes showed X = 372.5. The company has specified 368 gm.σ to be 15 grams. Test atthe α=0.05 level. H0: µ = 368 H1: µ ≠ 368
• Example Solution: Two TailH0: µ = 386 Test Statistic:H1: µ ≠ 386 X − µ 372.5 − 368α = 0.05 Z= = = 1.50 σ 15n = 25 n 25Critical Value: ±1.96 Decision: Reject Do Not Reject Ho at α = .05 .025 .025 Conclusion: No Evidence that True -1.96 0 1.96 Z Mean Is Not 368
• Two tail hypotheses tests = Confidence Intervals _ For X = 372.5oz, σ = 15 and n = 25, The 95% Confidence Interval is: 372.5 - (1.96) 15/ 25 to 372.5 + (1.96) 15/ 25 or 366.62 ≤ µ ≤ 378.38If this interval contains the Hypothesized mean (368), wedo not reject the null hypothesis. It does. Do not reject Ho.
• t-Test: σ UnknownAssumptions  Population is normally distributed  If not normal, only slightly skewed & a large sample takenParametric test proceduret test statistic X −µ t= S n
• Example: One Tail t-TestDoes an average box of cerealcontain more than 368 gramsof cereal? A random sample of36 boxes showed X = 372.5,and s= 15. Test at the α=0.01 368 gm.level. σ is not H0: µ ≤ 368 given, H1: µ > 368
• Example Solution: One TailH0: µ ≤ 368 Test Statistic:H1: µ > 368 X − µ 372.5 − 368α = 0.01 t= = = 1.80 S 15n = 36, df = 35 n 36Critical Value: 2.4377 Decision: Reject Do Not Reject Ho at α = .01 .01 Conclusion: No Evidence that True 0 2.4377 Z Mean Is More than 368
• Proportions• Involves categorical variables• Fraction or % of population in a category• If two categorical outcomes, binomial distribution  Either possesses or doesn’t possess the characteristic• Sample proportion (p) p = X = number of successes n samplesize
• Example:Z Test for Proportion•Problem: A marketing company claimsthat it receives π = 4% responses from itsMailing.•Approach: To test this claim, a randomsample of n = 500 were surveyed with x =25 responses.•Solution: Test at the α = .05 significancelevel.
• Z Test for Proportion: SolutionH0: π = .04 Test Statistic:H1: π ≠ .04α = .05 p-π .05-.04 Z ≅ = = 1.14n = 500, x = 25 π (1 - π ) .04 (1 - .04)p = x/n = 25/500 = 0.05 n 500 Critical Values: ± 1.96 Decision: Reject Reject Do not reject Ho at α = .05 .025 .025 Conclusion: We do not have sufficient evidence to reject the company’s 0 Z claim of 4% response rate.