Concept of One-Sample T-Test
Imagine you have a production line, where you've previously discovered that the average weight of products is 300 grams, with a standard deviation of 30 grams. You're aware that when you take samples from this population, the sample means can vary, perhaps around 320 or 330 grams, which is normal.
During a quality assurance inspection, the inspector found that a random sample of 25 products had an average weight of 380 grams and a standard deviation of 50 grams. This finding suggests our initial estimated mean of 300 grams is likely inaccurate.
To question this hypothesis, we employ a one-sample t-test. This test aids us in verifying the accuracy of our initial assumption about the population mean. In the forthcoming sections, we'll be exploring the steps needed to perform a successful one-sample t-test.
Setting the Hypothesis
When testing a hypothesis, we have a null hypothesis, presented as , and an alternative hypothesis, noted as . The null hypothesis symbolizes our initial understanding of the mean, which we call the hypothesized population mean. Meanwhile, the alternative hypothesis signifies the challenge we aim to test.
In a one-sample t-test, the null hypothesis always takes one specific form.
Returning to our earlier example with the production line,
The alternative hypothesis can come in three forms, asserting a contradiction in the mean being less, more than the initial information, or simply stating that the initial value is likely incorrect. This is known as one-tailed or two-tailed hypotheses. The key difference between the one-tailed and two-tailed hypotheses emerges when calculating the p-value.
Sampling
Given it's a one-sample t-test, we'll require one random sample from the population. From this sample, we determine two crucial pieces of information: sample mean () and sample standard deviation (). Random selection of the sample is essential to avoid any bias in the mean.
In our example, the inspector randomly picked a sample of 25 products () and found its mean () to be 340, with a standard deviation () of 50.
The p-value
The p-value helps decide if the null hypothesis is plausible. It indicates whether we should reject or fail to reject the null hypothesis. In essence, it shows the probability of obtaining the same or an even more extreme sample mean than the one we've recorded. Three simple steps follow to calculate the p-value:
Calculate the t-critical value:
This formula adopts the following variables:
: sample mean
: hypothesized population mean
: sample standard deviation
: sample size
Applying this formula in our example yields,Calculate the degrees of freedom:
Using this formula:
Given that the inspector sampled 25 products, the degree of freedom equals: .Find the corresponding p-value:
Determining the p-value can be a bit complex and impractical. Hence, statisticians calculate p-values for a range of t-values and compile these results into a table known as a t-table.
The t-table comprises columns of degrees of freedom and rows of t-critical values. At the top are the p-values for one-tailed and two-tailed hypotheses.
Significance level
The significance level, represented by alpha (), serves as a threshold to help us to decide on our test results. Typically, we set it at 0.05 (5%). A significance level of 5% means that if we repeat the same experiment 100 times, each with a significance level of 5%, we'd expect on average, five of those experiments to yield statistically significant results purely due to chance.
In our test, we compare the p-value with the significance level to make our decision:
1. If the p-value , we have strong evidence against the null hypothesis, implicating that the initial mean isn't true.
2. If the p-value , it means that we don't have enough evidence against the null hypothesis. In other words, there isn't sufficient data to support the alternative hypothesis.
One-Sample T-Test Assumptions
Before applying a one-sample t-test, we need to confirm a few assumptions:
Random sampling: random selection ensures that there won't be any bias in the sample as each observation in the population has an equal chance of being chosen.
Normality: The population distribution should approximate a normal distribution, and this assumption becomes more critical as the sample size decreases.
Independence: This implies that no observation affects any other observation. For example, if we sample from a coffee machine dispenser, the weight of any cup won't affect any other cup. Hence, this sample is independent.
Conclusion
A one-sample t-test is a method used for hypothesis testing, aiming to check whether the population mean differs from a known or hypothesized value. Before running the test, you need to fulfill certain requirements. Firstly, the sample must be randomly selected. Secondly, your sampling data should follow a normal distribution. Thirdly, your observations must be independent, with no observation affecting the other.
The steps to perform this test are as follows:
Define your hypothesis, considering any contradiction in our initial understanding of the population mean.
Pull a random sample from the population and calculate its mean and standard deviation.
Calculate the critical t-value.
Use this t-value to find the p-value, either by referring to a t-table or using a suitable p-value calculator.
Compare your calculated p-value with the set significance level.
Finally, make your decision; you can either reject the null hypothesis or acknowledge that there isn't enough evidence to reject it.