Fundamentals of Hypothesis Testing
Embed Size (px)
Transcript of Fundamentals of Hypothesis Testing
FUNDAMENTALS of HYPOTHESIS TESTING
Errors in Decision MakingPossible Hypothesis Test Outcomes
DecisionH0 TrueH0 False
Do Not Reject H0No ErrorProbability 1 - Type II ErrorProbability
Reject H0Type I ErrorProbability No ErrorProbability 1 -
SOAL:1. A random sample of size 20, from a normal population, has mean = 182 and s = 2.3. Test With = 0.05
2. Heights were measured for 12 plants grown under the treatment of a particular nutrient. The sample mean and standard deviation of those measurements were and 10 inches, respectively.
3. Measurements of the acidity (pH) of rain samples were recorded at 13 sites in an industrial region.
3.55.15.03.188.8.131.52.184.108.40.206.74.8 Determine a 95% confidence interval for the mean acidity of rain in that region.4. A physical model suggests that the mean temperature increase in the water used as coolant in a compressor chamber should not be more than 50 C. Temperature increases in the coolant measured on 8 independent runs of the compressing unit revealed the following data:220.127.116.11.18.104.22.168.1a. Do the data contradict the assertion of the physical model? (Test at =0.05) State the assumption you make about the population.b. Determine a 95% confidence interval for the mean increase of the temperature in the coolant. 5. The average weekly earnings for all full-time equivalent employees are reported to be $344.Suppose that you want to check this claim sice you believe it is too low. You want to prove that average weekly earnings of all employees are higher that the amount stated. You collect a random sample of 1,200 employees in all areas and find that sample mean is $361 and the sample standard deviation $110. Can you didisprove the claim?
6. According to Money, the average amount of money that a typical person in the United States would need to make him or her feel rich is $1.5 million. A researcher wants to test this claim. A random sample of 100 people in the United States reveales that their mean amount to feel rich is $2.3 milion and the standard deviation is $0.5 milion. Conduct the test.The Null Hypothesis, H0
States the assumption (numerical) to be testedExample: The mean number of TV sets in U.S. Homes is equal to three.
Is always about a population parameter, not about a sample statistic. The Null Hypothesis, H0Begin with the assumption that the null hypothesis is trueSimilar to the notion of innocent untilproven guiltyIt refers to the status quoAlways contains = , or signMay or may not be rejectedThe Alternative Hypothesis, H1Is the opposite of the null hypothesise.g., The mean number of TV sets in U.S. homes is not equal to 3 ( H1: 3 )Challenges the status quoNever contains the = , or signMay or may not be provenIs generally the hypothesis that the researcher is trying to proveThe Hypothesis Testing ProcessClaim: The population mean age is 50.H0: = 50, H1: 50Sample the population and find sample mean.PopulationSampleThe Hypothesis Testing ProcessSuppose the sample mean age was X = 20.This is significantly lower than the claimed mean population age of 50.If the null hypothesis were true, the probability of getting such a different sample mean would be very small, so you reject the null hypothesis .In other words, getting a sample mean of 20 is so unlikely if the population mean was 50, you conclude that the population mean must not be 50.The Hypothesis Testing ProcessSampling Distribution of X = 50If H0 is trueIf it is unlikely that you would get a sample mean of this value ...... then you reject the null hypothesis that = 50.20... if in fact this were the population meanXThe Test Statistic and Critical ValuesIf the sample mean is close to the assumed population mean, the null hypothesis is not rejected.If the sample mean is far from the assumed population mean, the null hypothesis is rejected.How far is far enough to reject H0?The critical value of a test statistic creates a line in the sand for decision making.The Test Statistic and Critical ValuesCritical ValuesDistribution of the test statisticRegion of RejectionRegion of RejectionErrors in Decision MakingType I Error Reject a true null hypothesisConsidered a serious type of errorThe probability of a Type I Error is Called level of significance of the testSet by researcher in advanceType II ErrorFailure to reject false null hypothesisThe probability of a Type II Error is Level of Significance, H0: 50 H1: < 500H0: 50 H1: > 50aa Represents critical valueLower-tail test0Upper-tail testTwo-tail testRejection region is shaded0H0: = 50 H1: 50Claim: The population mean age is 50.a/2a/2Hypothesis Testing: KnownFor two tail test for the mean, known:Convert sample statistic ( X ) to test statistic
Determine the critical Z values for a specifiedlevel of significance from a table Decision Rule: If the test statistic falls in the rejection region, reject H0 ; otherwise do not reject H0
Hypothesis Testing: KnownExample: Test the claim that the true mean weight ofchocolate bars manufactured in a factory is 3 ounces.
State the appropriate null and alternative hypothesesH0: = 3 H1: 3 (This is a two tailed test)Specify the desired level of significanceSuppose that = .05 is chosen for this testChoose a sample sizeSuppose a sample of size n = 100 is selectedHypothesis Testing: Known
Determine the appropriate technique is known so this is a Z testSet up the critical valuesFor = .05 the critical Z values are 1.96Collect the data and compute the test statisticSuppose the sample results are n = 100, X = 2.84 ( = 0.8 is assumed known from past company records)So the test statistic is:Hypothesis Testing: KnownReject H0Do not reject H0Is the test statistic in the rejection region? = .05/2-Z= -1.960Reject H0 if Z < -1.96 or Z > 1.96; otherwise do not reject H0 = .05/2Reject H0+Z= +1.96Here, Z = -2.0 < -1.96, so the test statistic is in the rejection regionHypothesis Testing: KnownReach a decision and interpret the resultSince Z = -2.0 < -1.96, you reject the null hypothesis and conclude that there is sufficient evidence that the mean weight of chocolate bars is not equal to 3.
Hypothesis Testing: Known6 Steps of Hypothesis Testing:1. State the null hypothesis, H0 and state the alternative hypotheses, H12. Choose the level of significance, , and the sample size n.3. Determine the appropriate statistical technique and the test statistic to use4. Find the critical values and determine the rejection region(s)Hypothesis Testing: Known5. Collect data and compute the test statistic from the sample result6.Compare the test statistic to the critical value to determine whether the test statistic falls in the region of rejection. Make the statistical decision: Reject H0 if the test statistic falls in the rejection region. Express the decision in the context of the problemHypothesis Testing: Knownp-Value ApproachThe p-value is the probability of obtaining a test statistic equal to or more extreme ( < or > ) than the observed sample value given H0 is trueAlso called observed level of significanceSmallest value of for which H0 can be rejected Hypothesis Testing: Knownp-Value ApproachConvert Sample Statistic (ex. X) to Test Statistic (ex. Z statistic )Obtain the p-value from a table or by using ExcelCompare the p-value with If p-value < , reject H0If p-value , do not reject H0 Hypothesis Testing: Knownp-Value ApproachExample: How likely is it to see a sample mean of 2.84 (or something further from the mean, in either direction) if the true mean is = 3.0?
X = 2.84 is translated to a Z score of Z = -2.0 p-value =.0228 + .0228 = .0456.0228/2 = .025-1.960-2.0Z1.962.0.0228/2 = .025Hypothesis Testing: KnownOne Tail TestsIn many cases, the alternative hypothesis focuses on a particular directionH0: 3 H1: < 3H0: 3 H1: > 3This is a lower-tail test since the alternative hypothesis is focused on the lower tail below the mean of 3This is an upper-tail test since the alternative hypothesis is focused on the upper tail above the mean of 3Hypothesis Testing: KnownLower Tail TestsThere is only one critical value, since the rejection area is in only one tail.Reject H0Do not reject H0-ZZXCritical valueHypothesis Testing: KnownUpper Tail TestsThere is only one critical value, since the rejection area is in only one tail.Reject H0Do not reject H0ZCritical valueZXHypothesis Testing: KnownUpper Tail Test ExampleA phone industry manager thinks that customer monthly cell phone bills have increased, and now average more than $52 per month. The company wishes to test this claim. Past company records indicate that the standard deviation is about $10.H0: 52 the mean is less than or equal to than $52 per monthH1: > 52 the mean is greater than $52 per month(i.e., sufficient evidence exists to support the managers claim)Form hypothesis test:Hypothesis Testing: KnownUpper Tail Test ExampleSuppose that = .10 is chosen for this testFind the rejection region:Reject H0Do not reject H0 = .10Z0Reject H01- = .90Hypothesis Testing: KnownUpper Tail Test ExampleWhat is Z given a = 0.10?Z.07.091.1.8790.8810.88301.2.8980.90151.3.9147.9162.9177z01.28.08a = .10Critical Value = 22.214.171.12497.10.90Hypothesis Testing: KnownUpper Tail Test ExampleObtain sample and compute the test statistic.Suppose a sample is taken with the following results: n = 64, X = 53.1 (=10 was assumed known from past company records) Then the test statistic is:
Hypothesis Testing: KnownUpper Tail Test ExampleReach a decision and interpret the result: = .101.280Reject H01- = .90Z = .88Do not reject H0 since Z = 0.88 1.28i.e.: there is not sufficient evidence that the