In: Statistics and Probability
An important quality characteristic used by the manufacturers of ABC asphalt shingles is the amount of moisture the shingles contain when they are packaged. Customers may feel that they have purchased a product lacking in quality if they find moisture and wet shingles inside the packaging. In some cases, excessive moisture can cause the granules attached to the shingles for texture and colouring purposes to fall off the shingles resulting in appearance problems. To monitor the amount of moisture present, the company conducts moisture tests. A shingle is weighed and then dried. The shingle is then reweighed, and based on the amount of moisture taken out of the product, the pounds of moisture per 100 square feet is calculated. The company would like to show that the mean moisture content is less than 0.35 pound per 100 square feet. The file (A & B shingles.csv) includes 36 measurements (in pounds per 100 square feet) for A shingles and 31 for B shingles. 3.1. For the A shingles, form the null and alternative hypothesis to test whether the population mean moisture content is less than 0.35 pound per 100 square feet. 3.2. For the A shingles, conduct the test of hypothesis and find the p-value. Interpret the p-value. Is there evidence at the 0.05 level of significance that the population mean moisture content is less than 0.35 pound per 100 square feet? 3.3. For the B shingles, form the null and alternative hypothesis to test whether the population mean moisture content is less than 0.35 pound per 100 square feet. 3.4. For the B shingles, conduct the test of the hypothesis and find the p-value. Interpret the p-value. Is there evidence at the 0.05 level of significance that the population mean moisture content is less than 0.35 pound per 100 square feet? 3.5. 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? 3.6. What assumption about the population distribution is needed in order to conduct the hypothesis tests above? 3.7. Check the assumptions made with histograms, boxplots, normal probability plots or empirical rule. 3.8. Do you think that the assumption needed in order to conduct the hypothesis tests above is valid? Explain.and please send me python commands
A | B |
0.44 | 0.14 |
0.61 | 0.15 |
0.47 | 0.31 |
0.3 | 0.16 |
0.15 | 0.37 |
0.24 | 0.18 |
0.16 | 0.42 |
0.2 | 0.58 |
0.2 | 0.25 |
0.2 | 0.41 |
0.26 | 0.17 |
0.14 | 0.13 |
0.33 | 0.23 |
0.13 | 0.11 |
0.72 | 0.1 |
0.51 | 0.19 |
0.28 | 0.22 |
0.39 | 0.44 |
0.39 | 0.11 |
0.25 | 0.11 |
0.16 | 0.31 |
0.2 | 0.43 |
0.22 | 0.26 |
0.42 | 0.18 |
0.24 | 0.44 |
0.21 | 0.43 |
0.49 | 0.16 |
0.34 | 0.52 |
0.36 | 0.36 |
0.29 | 0.22 |
0.27 | 0.39 |
0.4 | |
0.29 | |
0.43 | |
0.34 | |
0.37 |
In order to solve this question I used R software.
R codes and output:
> d=read.table('moisture.csv',header=T,sep=',')
> head(d)
A B
1 0.44 0.14
2 0.61 0.15
3 0.47 0.31
4 0.30 0.16
5 0.15 0.37
6 0.24 0.18
> attach(d)
> t.test(A,mu=0.35,alternative='less')
One Sample t-test
data: A
t = -1.4735, df = 35, p-value = 0.07478
alternative hypothesis: true mean is less than 0.35
95 percent confidence interval:
-Inf 0.3548878
sample estimates:
mean of x
0.3166667
> t.test(B,mu=0.35,alternative='less')
One Sample t-test
data: B
t = -3.1003, df = 30, p-value = 0.00209
alternative hypothesis: true mean is less than 0.35
95 percent confidence interval:
-Inf 0.3154014
sample estimates:
mean of x
0.2735484
> var.test(A,B)
F test to compare two variances
data: A and B
F = 0.97732, num df = 35, denom df = 30, p-value = 0.9412
alternative hypothesis: true ratio of variances is not equal to
1
95 percent confidence interval:
0.4797428 1.9532994
sample estimates:
ratio of variances
0.9773232
> t.test(A,B,var.equal=T)
Two Sample t-test
data: A and B
t = 1.2896, df = 65, p-value = 0.2017
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-0.02365534 0.10989190
sample estimates:
mean of x mean of y
0.3166667 0.2735484
3.1
Hypothesis:
3.2
Test statistic, t = -1.4735, df = 35, p-value = 0.07478
Since p-value is greater than 0.05, we accept null hypothesis and conclude that the population mean moisture content is not less than 0.35 pound per 100 square feet.
3.3
Hypothesis:
3.4
Test statistic , t = -3.1003, df = 30, p-value = 0.00209
Since p-value is less than 0.05, we reject null hypothesis and conclude that the population mean moisture content is less than 0.35 pound per 100 square feet.
3.5
Hypothesis:
3.6
Before performing this test we need to check whether the two sample comes from normal population with equal variances.