| treatment | strength |
|---|---|
| t1 | 39.3 |
| t1 | 36.0 |
| t1 | 31.2 |
| t2 | 40.6 |
| t2 | 40.8 |
| t2 | 39.4 |
| t3 | 35.3 |
| t3 | 30.5 |
| t3 | 39.0 |
Part 1. Student’s T-Test: One Sample T-Test
Introduction
A t-test is an inferential statistic that determine whether there is a significant difference between the mean of an observation with the mean of another group of observations. It establishes a null hypothesis that the two means are the same, and a research hypothesis that the 2 means are not the same.
There are 3 types of t-tests as shown below. For part 1, we will demonstrate the use of one-sample t-test to infer whether the mean bending of a set of observations has passed a certain strength set by the international standard.
Types of T-tests
One Sample T-test
T-test for Independent Samples
Paired (or dependent) T-test
1. One Sample T-Test
One-sample t-test compares the mean of observations to a known standard (or theoretical/hypothetical) mean (μ) value. For example, after developing a particle board using a new technique, we need to test whether its bending strength meets a certain standard. The table below show the bending strength for each of the 3 treatments. Now, let us use one-sample t-test whether the strength for each treatment meets a minimum standard strength of 30.
Read the data and generate a box plot
ts <- data.table::fread("C:/transit/bending.csv")
boxplot(ts[,strength] ~ ts[,treatment], xlab="treatment", ylab = "bending strngth")Figure 1 and Table 1 seem to show that all the observations from each treatment have passed the standard bending strength of 30. Now let us use one-sample t-test to verify it.
1. Treatment 1
Hypothesis:
H0: μ < 30 (The bending strength of Treatment 1 is not significantly greater than 30)
H1: μ > 30 (The bending strength of Treatment 1 is significantly greater than 30)
t.test(ts[treatment=="t1",strength], mu = 30, alternative = "greater")
One Sample t-test
data: ts[treatment == "t1", strength]
t = 2.3602, df = 2, p-value = 0.0711
alternative hypothesis: true mean is greater than 30
95 percent confidence interval:
28.69719 Inf
sample estimates:
mean of x
35.493
Conclusion: Since the p-value of treatment 1 is 0.07110073, which is greater than 0.05, therefore, it failed to reject the null hypothesis that the bending strength of treatment 1 is not significantly greater than 30.
2. Treatment 2
Hypothesis:
H0: μ < 30 (The bending strength of Treatment 2 is not significantly greater than 30)
H1: μ > 30 (The bending strength of Treatment 2 is significantly greater than 30)
t.test(ts[treatment=="t2",strength], mu = 30, alternative = "greater")
One Sample t-test
data: ts[treatment == "t2", strength]
t = 23.677, df = 2, p-value = 0.0008896
alternative hypothesis: true mean is greater than 30
95 percent confidence interval:
39.02271 Inf
sample estimates:
mean of x
40.292
Conclusion: Since the p-value of treatment 2 is 0.0008895528, which is less than 0.05. Therefore, the test rejects the null hypothesis. The bending strength of treatment 2 is significantly greater than 30.
3. Treatment 3
Hypothesis:
H0: μ < 30 (The bending strength of Treatment 3 is not significantly greater than 30)
H1: μ > 30 (The bending strength of Treatment 3 is significantly greater than 30)
t.test(ts[treatment=="t3",strength], mu = 30, alternative = "greater")
One Sample t-test
data: ts[treatment == "t3", strength]
t = 1.9961, df = 2, p-value = 0.09202
alternative hypothesis: true mean is greater than 30
95 percent confidence interval:
27.71562 Inf
sample estimates:
mean of x
34.93567
Conclusion: Since the p-value of treatment 3 is 0.09201621, which is greater than 0.05, therefore, it failed to reject the null hypothesis that the bending strength of treatment 3 is not significantly greater than 30.
2. T-test for Independent Samples (to follow)
3. Paired T-Test (to follow)
Summary
There are 3 treatments tested. The 3 treatments vary depending on the ingredients used in making the cement bonded boards. Although the mean bending strength of the 3 treatments exceeded 30, the one sample t-test infers that only treatment 2 has a significantly stronger bending strength as set by the international standard. The rest of the treatments did not significantly meet the international standard of 30 units.
References:
https://jwoodscience.springeropen.com/articles/10.1186/s10086-021-02004-3
https://www.statology.org/one-sample-t-test-example-problems/