Saturday 28 June 2014

The t-Test Procedure

THE TTEST PROCEDURE

t-Test are commonly done when the population standard deviation is unknown. We use the t-distribution

The ttest procedure performs t-tests for one sample, two samples and paired observations. 

  • The single-sample t-test compares the mean of the sample to a given number (which you supply). 
  • The dependent-sample t-test compares the difference in the means from the two variables to a given number (usually 0), while taking into account the fact that the scores are not independent. 
  • The independent samples t-test compares the difference in the means from the two groups to a given value (usually 0).  In other words, it tests whether the difference in the means is 0. 

One Sample t-Test

This function gives a single sample Student t test with a confidence interval for the mean difference.

The single sample t method tests a null hypothesis that the population mean is equal to a specified value. If this value is zero (or not entered) then the confidence interval for the sample mean is given (Altman, 1991; Armitage and Berry, 1994).

The test statistic is calculated as:

- where x bar is the sample mean, s² is the sample variance, n is the sample size, ยต is the specified population mean and t is a Student t quantile with n-1 degrees of freedom.

Power is calculated as the power achieved with the given sample size and variance for detecting the observed mean difference with a two-sided type I error probability of (100-CI%)% (Dupont, 1990).

Here is a Question: In a population the average IQ is 100. A team of scientists wants to test a new medication to see if it has either a positive or negative effect on intelligence or no effect at all. A sample of 30 participants who have taken the medication has a mean of 140 with a standard deviation of 20. Did the medication affect intelligence? Alpha = 0.05

We are going to answer these steps with the Alpha = 0.05

1. Define Null and Alternative Hypotheses
2. State the Alpha
3. Calculate the Degrees of Freedom
4. State Decision Rule
5. Calculate Test Statistic
6. State the Result
7. State the Conclusion

Note that we do not know the population. We know that the population mean is 100. The sample standard deviation is 20

1. Define Null and Alternate Hypotheses:
In this case the NULL Hypotheses is that the mean is equal to 100 because that's what the population Mean is. The alternative hypotheses is that the mean is not equal to 100. Because we are testing to see if there is any difference from the expected value of 100

2. State the Alpha:
The alpha level is .05

3. Calculate the Degree of Freedom:
To calculate the Degrees of Freedom use the sample number n - 1 = 29

4. State the Decision Rule
We have an Alpha of .05 we want to find what the middle 95% of what we would expect the mean to be if it's outside in this two-tailed test. We need to conclude that the mean of the is and likely that our sample is different from the population we are comparing to (or the expected population)

Remember that our alpha level is .05. This is a two tailed test and 29 DF. The critical value we are going to use is 2.0452. We would expect most values to fall within -2.0452 and +2.0452. If it falls outside of that range we are going to conclude that our sample is different from the expected population. So the Decision Rule is if t is less than the -2.0452 or more than the +2.0452 we are going to reject the NULL Hypothesis.

5. Calculate the Test Statistic:
Well now lets calculate the Test Statistic.
The Sample mean = 140 (x bar)
The Population Mean = 100 (Mu)
Sample Standard deviation = 20 (s)
Sample Size = 30 (n)

t = x bar - Mu/ (s/sq root of n) = 10.96

6. State Results
Decision Rule: If t is Less than -2.0452, or greater than 2.0452 reject the Null hypothesis. Over here t = 10.96. This value is definitely greater than 2.0452. So we are going to Reject the Null Hypothesis.
Result: Reject Null Hypothesis.

7. State the Conclusion
Medication significantly affected the intelligence, t = 10.96. p < 0.05


Another Example:







 

No comments:

Post a Comment