0% found this document useful (0 votes)
265 views2 pages

Prob 3

The document discusses analyzing moisture content data from two types of asphalt shingles (Samples A and B). One-sample t-tests are conducted to test if the mean moisture content of each sample is equal to 0.35 pounds per 100 square feet. The results show that for Sample A, there is not enough evidence to conclude the mean is less than 0.35, but for Sample B there is enough evidence to conclude the mean is not less than 0.35. A two-sample t-test is then conducted to test if the population means of Samples A and B are equal, which fails to reject the null hypothesis of equality after checking the assumption of equal variances.

Uploaded by

shilpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views2 pages

Prob 3

The document discusses analyzing moisture content data from two types of asphalt shingles (Samples A and B). One-sample t-tests are conducted to test if the mean moisture content of each sample is equal to 0.35 pounds per 100 square feet. The results show that for Sample A, there is not enough evidence to conclude the mean is less than 0.35, but for Sample B there is enough evidence to conclude the mean is not less than 0.35. A two-sample t-test is then conducted to test if the population means of Samples A and B are equal, which fails to reject the null hypothesis of equality after checking the assumption of equal variances.

Uploaded by

shilpa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Answer:

Explanation:

3.1Problem Do you think there is evidence that mean moisture contents in both types
of shingles are within the permissible limits?
State your conclusions clearly showing all steps.

Solution:

Input - Python Jupyter

t_statistic, p_value = ttest_1samp(df.A, 0.35)

print('One sample t test \nt statistic: {0} p value: {1} '.format(t_statistic,


p_value/2))

Output from Python Jupyter

One sample t test

t statistic: -1.4735046253382782 p value: 0.07477633144907513


--------------------------------------------------
Since pvalue > 0.05, do not reject H0 . There is not enough evidence to conclude
that the mean moisture content for Sample A shingles is less than 0.35 pounds per
100 square feet. p-value = 0.0748. If the population mean moisture content is in
fact no less than 0.35 pounds per 100 square feet, the probability of observing a
sample of 36 shingles that will result in a sample mean moisture content of 0.3167
pounds per 100 square feet or less is .0748.

Input - Python Jupyter

t_statistic, p_value = ttest_1samp(df.B, 0.35,nan_policy='omit' )

print('One sample t test \nt statistic: {0} p value: {1} '.format(t_statistic,


p_value/2))

Output from Python Jupyter

One sample t test

t statistic: -3.1003313069986995 p value: 0.0020904774003191826

Since pvalue < 0.05, reject H0 . There is enough evidence to conclude that the mean
moisture content for Sample B shingles is not less than 0.35 pounds per 100 square
feet. p-value = 0.0021. If the population mean moisture content is in fact no less
than 0.35pounds per 100 square feet, the probability of observing a sample of 31
shingles that will result in a sample mean moisture content of 0.2735 pounds per
100 square feet or less is .0021.

3.2 Problem Do you think that the population means for shingles A and B are equal?
Form the hypothesis and conduct the test of the hypothesis. What assumption do you
need to check before the test for equality of means is performed?

Solution:

H0 : μ(A)= μ(B)

Ha : μ(A)!= μ(B)
α = 0.05

Input - Python Jupyter

t_statistic,p_value=ttest_ind(df['A'],df['B'],equal_var=True ,nan_policy='omit')

print("t_statistic={} and pvalue={}".format(round(t_statistic,3),round(p_value,3)))

Output from Python Jupyter

t_statistic=1.29 and pvalue=0.202

As the pvalue > α , do not reject H0;


and we can say that population mean for shingles A and B are equal Test
Assumptions When running a two-sample t-test,
the basic assumptions are that the distributions of the two populations are
normal, and that the variances of the two distributions are the same. If those
assumptions are not likely to be met, another testing procedure could be use.

You might also like