0% found this document useful (0 votes)
2 views7 pages

Hypothesis Testing Example2

The document provides various examples of hypothesis testing, including one-sample tests, two-sample tests, paired t-tests, and chi-square tests. Each example outlines the null and alternative hypotheses, significance levels, test statistics, and conclusions based on calculated values compared to tabulated values. The document emphasizes the importance of using appropriate statistical methods based on sample size and known parameters.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

Hypothesis Testing Example2

The document provides various examples of hypothesis testing, including one-sample tests, two-sample tests, paired t-tests, and chi-square tests. Each example outlines the null and alternative hypotheses, significance levels, test statistics, and conclusions based on calculated values compared to tabulated values. The document emphasizes the importance of using appropriate statistical methods based on sample size and known parameters.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Example 1

Suppose that it is known from experience that the standard deviation of the weight of 8-ounce packages
of cookies made by a certain bakery is 0.16 ounce. To check whether its production is under control on a
given day, namely, to check, whether the true average weight of the packages is 8 ounces, the quality
engineer selects a random sample of 25 packages and find that their average weight is x (bar) =8.091
ounces. Since the bakery stands to loose money when μ > 8 and the customer looses out when μ < 8,
test the null hypothesis μ = 8 against the alternative hypothesis μ =/= 8 at the .01 level of significance.
Assume the population has normal.

Solution 1

Step 1. H0 : μ = 8 , H1 : μ =/= 8 , ᾳ = 0.01

Step 2. Reject H0 if z < = -2.575 or z >= 2.575 where z = (x bar - μ0)/ (σ/ root(n))

Step 3. Substituting x (bar) = 8.091, μ0 = 8, σ = 0.16 and n = 25, we get z = 2.84

Step 4. Since z (calculated) i.e. 2.84 exceeds z (tabulated) i.e. 2.575, the H0 must be rejected and
suitable adjustments must be made in the production process.

Alternate Approach

In this approach, we find a P value of 0.0046 and since the P value is less than .01, the conclusion
remains same.

Note: If the sample size is > = 30 we use normal distribution. In such a case, if population standard
deviation is not known, we replace it with sample standard deviation.

Example 2

Suppose that 100 tires made by a certain manufacturer lasted on the average 21,819 miles. Spse
population stand. Dev. is 1, 295 miles. Test the null hypothesis μ = 22,000 miles against the alternative
hypothesis μ < 22,000 miles at the .05 level of significance.

Solution:

Step 1. H0 : μ = 22,000 , H1 : μ < 22,000 , ᾳ = 0.05

Step 2. Reject H0 if z < = -1.645 where z = (x bar - μ0)/ (σ/ root(n))

Step 3. Substituting x (bar) = 21,819, μ0 = 22,000, s = 1,295 for σ and n = 100, we get z = -1.40

Step 4. Since z (calculated) i.e. -1.40 exceeds z (tabulated) i.e. -1.645, the H0 cannot be rejected; there
is no real evidence that the tires are not as good as assumed under the null hypothesis.

Alternate Approach

In this approach, we find a P value of 0.0808 and since the P value exceeds.05, the conclusion remains
same.
When n < 30 and σ2 is unknown, z statistic cannot be used. In such a case, we use t statistic.

t = (x bar - μ0)/ (s/ root(n)) which follows t distribution with (n-1) degrees of freedom (d.f.).

Thus, critical regions (CR) of size ᾳ for testing H0 : μ = μ0 against H1 : μ =/= μ0 , μ > μ0 or μ < μ0
are respectively |t| >= t ( ᾳ/2, n-1), t >= t ( ᾳ, n-1) and t <= - t( ᾳ, n-1).

Example 3 (One sample t-test)

The specifications for a certain kind of ribbon call for a mean breaking strength of 185 pounds. If 5
pieces randomly selected from different rolls have breaking strengths of 171.6, 191.8, 178.3, 184.9 and
189.1 pounds, test the null hypothesis μ = 185 pounds against the alternative hypothesis μ < 185
pounds at the .05 level of significance. Assume the population to be normally distributed.

Solution:

Step 1. H0 : μ = 185, H1 : μ < 185, ᾳ = 0.05

Step 2. Reject H0 if t < = -2.132, where t = (x bar - μ0)/ (s/ root(n))

Step 3. Substituting x (bar) = 183.1 s = 8.2, μ0 = 185, and n = 5, we get t = -0.49

Step 4. Since t value i.e. -0.49 exceeds t .05, 4 (tabulated) i.e. -2.132 , the H0 cannot be rejected

Example 4

An experiment is performed to determine whether the average nicotine content of one kind of cigarette
exceeds that that of another kind by 0.20 mg. If n1 = 50 cigarettes of first kind had an average nicotine
content of x1 bar = 2.61 mg with a sd of s1 = 0.12 mg, whereas n2 = 40 cigarettes of the other kind had
an average nicotine content of x2 bar = 2.38 mg with a sd of s2 = .14 mg, test the null hypothesis μ1 –
μ2 = 0.20 against the alternative hypothesis μ1 – μ2 =/= 0.20 at the 0.05 level of significance. Base the
decision on the P Value corresponding to the value of the appropriate test statistic.

Solution 4:

Step 1. H0 : μ1 – μ2 = 0.20 , H1 : μ1 – μ2 =/= 0.20, ᾳ = 0.05

Step 2. Use the test statistic Z, where z = (x1 bar - x2 bar - delta)/ ( root[ (σ12/n1) + (σ22/n2)] )

Step 3. Substituting x1 (bar) = 2.61 x2 (bar) = 2.38, delta = 0.20, and s1 = 0.12 for σ1 , s2 = 0.14 for
σ2, n1=50 and n2=40 into this formula, we get z = 1.08

The corresponding P – value is 2 (0.50 – 0.3599) = 0.2802. where 0.3599 is the entry in Table for z=1.08.

Step 4. Since 0.2802 exceeds 0.05, the null hypothesis cannot be rejected; either we accept the null
hypothesis or we say that the difference beween 2.61 – 2.38 = 0.23 and 0.20 is not significant i.e. the
difference may be attributed to chance.

Example 5
In the comparison of two kinds of paint, a consumer testing service finds that four 1 gallon cans of one
brand cover on an average 546 sq feet with a s.d. of 31 sq ft, whereas four 1 –gallon cans of another
brand cover on an average 492 sq feet with a s.d. of 26 sq ft. Assuming that the two populations samples
are normal and have equal variances, test the null hypothesis μ1 – μ2 = 0 against the alternative
hypothesis μ1 – μ2 > 0 at 5% level of significance.

Solution 5:

Step 1. H0: μ1 – μ2 = 0 , H1 : μ1 – μ2 > 0 , ᾳ = 0.05

Step 2. Reject the null hypothesis if t >= 1.943, where t is calculated as:

t= (x1 bar – x2 bar – delta) / sp [root ( (1/n1) + (1/n2) )]

where sp2 = [(n1 – 1) s12 + (n2 – 1) s22 ] / (n1+n2-2)

and 1.943 is the value of t(.05, 6) [ df of t is n1+n2-2]

Step 3. Calculate sp . It comes out as 28.609 ; calculate t = (546-492)/ 28.609 [ ( root (1/4) +(1/4) ) ] =
2.67

Step 4. Since t = 2.67 exceeds 1.943, the null hypothesis must be rejected; we conclude that on the
average the first kind of paint covers a greater area than the second.

Note that in this example, n1 = n2 so the formula becomes sp2 = (s12 + s22 ) / 2. This will simplify
calculations

You may check that P value is 0.0185 and the conclusion remains same.

Example 6 (Paired t test)

The yields of two types Type A and Type B of grains in pounds per acre in 6 replications (i.e. 6 repeat
experiments on same plot) are given below. Give your comments on the difference in the mean yields.
Assume . ᾳ = 0.05, popln is normal, poln var is unkown.

Replication Type A Type B

1 205 248

2 246 263

3 230 282

4 300 308
5 304 300

6 238 220

H0: There is no difference in the mean yields of Type A and Type B i.e.

H0 : μ1 = μ2 against the two tailed alternative H1 : μ1 =/= μ2. ᾳ = 0.05

Under H0, the test statistic t in case of paired observations is:

t = d (bar) /[ s/ sqrt (n)] ~ t(n-1) { d(bar) is mean (d) }

We have d(bar) (i.e. mean of di = xi –yi ) = -16.3

s2 = (1/5) [ ∑ (di – mean (d) ]2

= 729.07

Thus, Mod (t) = mod [d (bar)] / /[ s/ sqrt (n)] = 1.48.

From Table, t (5, .05) = 2.57. Since t (calculated) < t (tabulated) , H0 may be accepted at 5% level of
significance.

Example 7

A company operates four machines on three separate shifts daily. The following table presents the data
for machine breakdowns resulted during 6 months time period:

Shift Machines Total

A B C D

1 10 12 6 7 35

2 10 24 9 10 53

3 13 20 7 10 50

Total 33 56 22 27 138
Test the Hypothesis that for an arbitrary breakdown the machine causing the breakdown and the shift
on which the breakdown occurred are independent.

Solution

E11 = (35 * 33)/138 = 8.37, E12 = (35*56)/138 = 5.58 Similarly, E13 = 5.58, E14 = 6.85, E21 = 12.67,
E22 = 21.5,

E23 = 8.45, E24 = 10.37, E31 =11.96, E32 =20.29 E33 = 7.79, E34 = 9.78

Test statistic

Chi Square (Use the notation) = [ ∑∑ (Oij - Eij )2 / Eij ] follows Chi Square with (r-1)* (c-1) degrees of
freedom where r is no. of rows and c is no. of columns.

Under H0: Chi Square (calculated) = 1.78

Degrees of freedom = 3

Chi Square (Tab) (3, .05) = 7.8

Since Chi Square (cal) is < Chi Square (tab) for 3 d.f. and 5% alpha, H0 may be accepted.
Applications of Chi Square Test

i) Test for population variance

Wts of 10 students are as follows:

Sl. No. 1 2 3 4 5 6 7 8 9 10
Wt (kg) 38 40 45 53 47 43 55 48 52 49

Can we say that the variance of the distribution of all students from which the above sample
is drawn is equal to 20 Kgs? Test this at 5% and 1% level of significance.

Soln:
H0: σ2 = σ20 (= 20Kg)
H1: σ2 =/= σ20

Sample size: n
Test Statistic: [(n-1)*(s2 ) / σ2 ]~ χ2n-1

s2 = 31.11

χ2cal = (31.11* 9)/20 = 13.999


ᾳ = .05
χ2tab (9, .025) = 19.0 and χ2tab (9, .975) = 2.7

Thus, χ2cal is in acceptance region

ᾳ = .01
χ2tab (9, .005) = 23.6 and χ2tab (9, .995) = 1.73

Thus, χ2cal is in acceptance region

Thus, ᾳ = .05
χ2tab (9, .025) = 19.0 and χ2tab (9, .975) = 2.7

Thus, χ2cal < χ2tab in both the cases. i.e. H0 may be accepted at 5 % as well as 1% levels of
significance. i.e. variance of population can be taken as 20 kg at both 5 % and 1% levels of
significance.

Example

A random sample of 15 paired observations from a bivariate normal population gives a


correlation coefficient of -0.5. Does this signify the existence of correlation in the sampled
population?

Solution

H0: Sampled population is uncorrelated i.e.H0: ρ = 0 against H0: ρ =/= 0

We have,n = 15, r=-0.5

Modulus(t) = Modulus ( write the test statistic here)

i.e. Modulus (t) = 2.08 (use Mod operator in place of ‘Modulus’)

Tabulated t(13, .05) = 2.16 . Since t (cal) < t (tab) , H0 may be accepted at 5% level of
significance.

You might also like