Download presentation
1
Test of Hypotheses for a Single Sample
Chapter 9 Test of Hypotheses for a Single Sample
2
Learning Objectives Structure hypothesis tests
Test hypotheses on the mean of a normal distribution using either a Z-test or a t-test procedure Test hypotheses on the variance or standard deviation of a normal distribution Test hypotheses on a population proportion Use the P-value approach for making decisions in hypotheses tests
3
Learning Objectives Compute power, type II error probability, and make sample size selection decisions for tests on means, variances, and proportions Explain and use the relationship between confidence intervals and hypothesis tests Use the chi-square goodness of fit test to check distributional assumptions Use contingency table tests
4
Statistical Hypotheses
Construct a confidence interval estimate of a parameter from sample data Many problems require that we decide whether to accept or reject a statement about some parameter Called a hypothesis Decision-making procedure about the hypothesis is called hypothesis testing
5
Statistical Hypotheses
Useful aspects of statistical inference Relationship between hypothesis testing and confidence intervals Focus is on testing hypotheses concerning the parameters of one or more populations
6
Sources of Null Hypothesis
Three ways to specify the null hypothesis May result from past experience or knowledge May be determined from some theory or model regarding the process under study May be determined from external considerations
7
Sample, Population and Statistical Inference
Statements about the population, not statements about the sample If this information is consistent with the hypothesis Conclude that the hypothesis is true If this information is inconsistent with the hypothesis Conclude that the hypothesis is false Truth or falsity of a particular hypothesis can never be known with certainty Unless we can examine the entire population
8
Structure of Hypothesis-testing
Identical in all the applications The null hypothesis Hypothesis we wish to test Rejection of the null hypothesis always leads to accepting the alternative hypothesis The alternate hypothesis Takes on several values Involves taking a random sample Computing a test statistic from the sample data Make a decision about the null hypothesis
9
Structure of Hypothesis-testing
Suppose a manufacturer is interested in the output voltage of a power supply Null hypothesis :H0: =50 v Alt. hypothesis: H1: 50 v A sample of n=10 specimens is tested If the sample mean is close to 50 v Such evidence supports the null hypothesis H0 If the sample mean is different from 50 v Such evidence is in support of the alternative hypothesis
10
Critical Regions The sample mean can take on many different values
Suppose 48.5 x 51.5 Constitutes the critical region for the test Acceptance region The boundaries between the critical regions and the acceptance region are called the critical values Critical values are 48.5 and 51.5 Fail to reject H0 =50 Volts Reject H0 50 Volts Reject H0 50 Volts
11
Two Types of Error Type I Error Type II Error
Occurs when a true null hypothesis is rejected Value of represents the probability of committing this type of error = P (Ho is rejected / Ho is true) is called the significance level of the test Type II Error Occurs when a false null hypothesis is not rejected Value of represents the probability of committing a type II error = P(fail to reject Ho / Ho is false)
12
Two Types of Error In testing any statistical hypothesis, four different situations determine whether the final decision is correct or in error Probabilities can be associated with the type I and type II errors H0 is True H0 is False Do not reject H0 Correct Decision Type II or error Reject H0 Type or error
13
Probability of Making a Type I Error
Probability of making a type I error is denoted = P (type I error) =P (reject H0 when H0 is true) Sometimes the type I error probability is called the significance level or the -error Previous example, a type I error will occur when either sample mean > 51.5 or <48.5 or when the true voltage is =50 v
14
Probability of Type I Error
Probability of type I error can be shown by the tails of normal distribution = P(X<48.5 when =50) +P(X>51.5 when =50) Using the corresponding z-values, =0.0574 5.74% of all random samples would lead to rejection of the hypothesis when the true mean is really 50 v
15
Probability of Type II Error
Examine the probability of a Type II error = P(type II error) = P(fail to reject H0 when H0 is false) Have a specific alternative hypothesis Alterative hypothesis: H1: =52 v A type II error will be committed if the sample mean falls between 48.5 and 51.5 when =52 v Probability that 48.5x-bar 51.5 when H0 is false (because =52) Using the z-values, the =0.2643 Corresponds to testing H0: =50 against H1: 50 with n =10, when the true value of the mean=52
16
Power of a Statistical Test
Power can be interpreted as the probability of correctly rejecting a false null hypothesis If it is too low, the analyst can increase either or the sample size n
17
Example-1 A textile fiber manufacturer is investigating a new drapery yarn, which the company claims has a mean thread elongation of 12 kg with a standard deviation of 0.5 kg. The company wishes to test the hypothesis H0: =12 against H1<12, using a random sample of four specimens. What is the type I error probability if the critical region is defined as sample mean <11.5 kg? Find for the case where the true mean elongation is kg.
18
Solution-Part 1 = P(reject H0 when H0 is true)
= P( 11.5 when = 12) = P(Z 2)= 1 P(Z 2) = 1 = The probability of rejecting the null hypothesis when it is true is
19
Solution-Part 2 = P(accept H0 when = 11.25) =
=P(Z > 1.0) = 1 P(Z 1.0) =1 = The probability of accepting the null hypothesis when it is false is
20
Tests on The Mean of a Normal Distribution, Variance Known
Consider hypothesis testing about the mean of a single, normal population where the variance of the population 2 is known Random sample X1, X2, … , Xn has been taken from the population x is an unbiased point estimator of with variance 2/n Test the hypotheses H0: =0 H1: 0 Test procedure for H0:=0 uses the test statistic
21
Cont. If is the significance level, the probability that the test statistic Z0 falls between -Z/2 and Z/2 will be 1- Regions associated with -Z/2 and Z/2 Reject H0 if the observed value of the test statistic z0 is either > Z/2 or <-Z/2
22
Location of Critical Region for One-sided Tests
The distribution of Z0 when H0: =0 is true, for the one-sided alternative H1: >0 The distribution of Z0 when H0: =0 is true, for the one-sided alternative H1: <0
23
Relationship between the Signs in Ho And H1
Two-sided Test Left-sided Test Right-sided Test Sign in the H0 = = or = or Sign in the H1 < > Rejection Region On both sides On the left side On the right side
24
General Procedure for Hypothesis Tests
Following steps will be used From the problem, identify the parameter of interest State the null hypothesis, H0 Specify an appropriate alternative hypothesis, H1 Choose a significance level Determine an appropriate test statistic
25
General Procedure for Hypothesis Tests
State the rejection region for the statistic Compute any necessary sample quantities, substitute these into the equation for the test statistic, and compute that value Decide whether or not H0 should be rejected
26
Example-2 A manufacturer produces crankshafts for an automobile engine
The wear of the crankshaft after 100,000 miles ( inch) is of interest because it is likely to have an impact on warranty claims A random sample of n=15 shafts is tested and sample mean is 2.78 It is known that =0.9 and that wear is normally distributed Test H0: =3 versus H1: 3 using =0.05
27
Solution Using the general procedure for hypothesis testing
The parameter of interest is the true mean crankshaft wear, H0 : = 3 H1 : 3 = 0.05 Test statistic is Reject H0 if z0 < z /2 where z0.005 = 1.96 or z0 > z/2 where z0.005 = 1.96 and = 0.9 Since –0.95 > -1.96, do not reject the null hypothesis and conclude there is not sufficient evidence to support the claim the mean crankshaft wear is not equal to 3 at = 0.05
28
P-Values in Hypothesis Tests
P-value is the smallest level of significance that would lead to rejection of the null hypothesis H0 Conveys much information about the weight of evidence against H0 Adopted widely in practice P-value is
29
Example-3 What is the P-value in Example-2? Solution
=2[ ] =0.34
30
Probability of Type II Error
Analyst directly selects the type I error probability Probability of type II error depends on the choice of sample size Considering a two-sided test, the probability of the type II error is the probability that Z0 falls between -Z/2 and Z/2 given that H1 is true Expressed mathematically, this probability is
31
Example-4 What is the power of the test in Example-2 if =3.25?
Solution = ( 1.075) ( 1.075) = (0.884) (3.035) = — =0.8098 Power= =0.1902
32
Choice of Sample Size Suppose that the null hypothesis is false and that the true value of the mean is = +0, where >0 Formulas that determine the appropriate sample size to obtain a particular value of for a given and are Two sided-test alternative hypotheses For either of the one-sided alternative hypotheses Where =-0
33
Example-5 Considering the problem in Example-2, what sample size would be required to detect a true mean of 3.75 if we wanted the power to be at least 0.9? Solution
34
Using Operating Characteristic Curves
Convenient to use the operating characteristic curves in Appendix Charts VIa and VIb to find Curves plot against a parameter d for various sample sizes n d is defined as
35
Using Operating Characteristic Curves
Curves are provided for both =0.05 and =0.01 When d=0.5, n =25, and =0.05, Then =0.3 30% chance that the true will not be detected by the test with n =25
36
Large-Sample Test In most practical situations 2 will be unknown
May not be certain that the population is well modeled by a normal distribution If n is large (say n>40) Sample standard deviation s can be substituted for Valid regardless of the form of the distribution of the population Relies on the central limit theorem just as we did for the large sample confidence interval
37
Tests On The Mean Of A Normal Distribution, Variance Unknown
Situation is analogous to Ch.8, where we constructed a C.I. S2 replaces 2 Use the test statistic Use the critical values -tα/2,n-1 and tα/2,n-1 as the boundaries of the critical region Reject H0: μ=μ0 if t0> tα/2,n-1 or if t0<-tα/2,n-1
38
Location of the Critical Region
39
Choice of Sample Size Situation is analogous to the case, where variance was known Use the sample variance s2 to estimate 2 Charts VIe, VIf, VIg, and VIh plot β for the t-test against a parameter d for various sample sizes n
40
Hypothesis Tests on the Standard Deviation of a Normal Population
Wish to test the hypotheses on the population variance Suppose H0: 2=20 H1: 2#20 Use the test statistic X2 follows the chi-square distribution with n-1 degrees of freedom Reject H0: 2=20 if X20> X2α/2,n-1 or if X20 <X21-α/2,n-1
41
Location of the Critical Region
Reference distribution for the test of H0: 2=20 with critical region values H1: 2 20 H1: 2 <20 H1: 2 >20
42
Tests on a Population Proportion
Test hypotheses on a population proportion Recall Pˆ =X/n is a point estimator of the proportion of the population p Sampling distribution of Pˆ is approximately normal with mean p and variance p(1-p)/n Now consider testing the hypotheses H0: p=p0 H1: p#p0 Use Reject H0: p=p0 if z0>zα/2 or z0<-zα/2
43
Type II Error and Choice of Sample Size
Obtain closed-form equations for the approximate β-error for the tests For the two-sided alternative, sample size equation For the one-sided alternative, sample size equation
44
Example-6 An article in Fortune (September 21, 1992) claimed that nearly one-half of all engineers continue academic studies beyond the B.S. degree, ultimately receiving either an M.S. or a Ph.D. degree Data from an article in Engineering Horizons (Spring 1990) indicated that 117 of 484 new engineering graduates were planning graduate study Are the data from Engineering Horizons consistent with the claim reported by Fortune? Use =0.05 in reaching your conclusions Find the P-value for this test
45
Solution Part 1 Part 2 True proportion of engineers, p H0 : p = 0.50
= 0.05 Test statistic Reject H0 if z0 < z/2 where z/2 = z0.025 = 1.96 or z0 > z/2 where z/2 = z0.025 = 1.96 x = 117 n = 484 Since < 1.96, reject the null hypothesis Part 2 P-value = 2(1 (11.352)) = 2(1 1) = 0
46
Testing for Goodness of Fit
Not know the underlying distribution of the population Wish to test the hypothesis that a particular distribution will be satisfactory as a population model For example, test the hypothesis that the population is normal Used a very useful graphical technique called probability plotting A formal goodness-of-fit test procedure based on the chi-square distribution
47
Test Procedure Requires a random sample of size n from the population whose probability distribution is unknown Arranged the n observations in a frequency histogram k bins or class intervals Let Oi be the observed frequency in the ith class interval Compute the expected frequency, Ei, in the ith class interval Test statistic If the population follows the hypothesized distribution, X2 has a chi-square distribution with k-p-1 d.o.f. p represents the number of parameters of the hypothesized distribution Reject the hypothesis that the distribution if the calculated value of the test statistic
48
Magnitude of Expected Frequencies
Application of this test procedure concerns the magnitude of the expected frequencies There is no general agreement regarding the minimum value of expected frequencies But values of 3, 4, and 5 are widely used as minimal Use 3 as minimal
49
Example-7 Consider the following frequency table of observations on the random variable X Based on these 100 observations, is a Poisson distribution with a mean of 1.2 an appropriate model? Perform a goodness-of-fit procedure with α=0.05 Values 1 2 3 4 Observed Frequencies 24 30 31 11
50
Solution Mean=1.2 Degrees of freedom=k-p-1=4-0-1=3 Compute pi
P1=P(X=0)=[e-01.2 (0.75)0]/0! =0.3012 Similarly, p2, p3, p4, and p5 are , , , , respectively Expected frequency Ei=npi Expected frequency for class 1 =0.3012*100=30.12 Similarly, the E2,E3, E4, and E5 are 36.14, 21.69, 8.67, and 2.60, respectively
51
Solution-Cont. Summarize the expected and observed frequencies are
Value Observed frequency Expected frequency Expected frequency in the last interval is < 3, we combine the last two rows
52
Solution-Cont. Variable of interest
H0: Form of the distribution is Poisson H1: Form of the distribution is not Poisson = 0.05 Test statistic is Reject H0 if Computations Since 7.23 < 7.81 do not reject H0
53
Contingency Table Tests
Classify n elements of a sample to two different criteria Know whether the two methods of classification are statistically independent Example Consider the population of graduating engineers May wish to determine whether starting salary is independent of academic disciplines First method of classification has r levels Second method has c levels Let Oij be the observed frequency for level i of the first classification and level j on the second classification Construct an r x c table Called an r x c contingency table
54
Testing the Hypothesis
Interested in testing the hypothesis that the methods of classification are independent By rejecting the hypothesis There is some interaction between the two criteria of classification The statistic Has an chi-square distribution with (r-1)(c-1) d.o.f. Reject the hypothesis of independence if
55
Example Patients in a hospital are classified as surgical or medical
A record is kept of the number of times patients require nursing service during the night and whether or not these patients are on Medicare. The data are presented here: Test the hypothesis (using =0.01) that calls by surgical medical patients are independent of whether the patients are receiving Medicare. Find the P-value for this test Solution
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.