T TEST
T TEST
T TEST
The t statistic is used to test hypotheses about an unknown population mean, μ, when the
value of σ is unknown. The formula for the t statistic has the same structure as the z-score
formula, except that the t statistic uses the estimated standard error in the denominator.
The only difference between the t formula and the z-score formula is that the z-score uses the
actual population variance, σ2 (or the standard deviation), and the t formula uses the
corresponding sample variance (or standard deviation) when the population value is not
known.
1. Independence: The observations in one sample are independent of the observations in the
other sample.
4. Random Sampling: Both samples were obtained using a random sampling method.
The t statistic is used instead of a z-score for hypothesis testing when the population standard
deviation (or variance) is unknown.
To compute the t statistic, you must first calculate the sample variance (or standard
deviation) as a substitute for the unknown population value.
sample variance=
Next, the standard error is estimated by substituting s2 in the formula for standard error. The
estimated standard error is calculated in the following manner:
Finally, a t statistic is computed using the estimated standard error. The t statistic is used as a
substitute for a z-score that cannot be computed when the population variance or standard
deviation is unknown.
t=
For a hypothesis test, you hypothesize a value for the unknown population mean and plug the
hypothesized value into the equation along with the sample mean and the estimated standard
error, which are computed from the sample data. If the hypothesized mean produces an
extreme value for t, you conclude that the hypothesis was wrong.
The t distribution is an approximation of the normal z distribution. To evaluate a t statistic
that is obtained for a sample mean, the critical region must be located in a t distribution.
There is a family of t distributions, with the exact shape of a particular distribution of t values
depending on degrees of freedom (n – 1). Therefore, the critical t values depend on the value
for df associated with the t test. As df increases, the shape of the t distribution approaches a
normal distribution.
t distributions are bell-shaped and symmetrical and have a mean of zero. However, t
distributions are more variable than the normal distribution as indicated by the flatter and
more spread-out shape. The larger the value of df is, the more closely the t distribution
approximates a normal distribution.
Hypothesis Testing with t Hypothesis testing with the t-statistic works exactly the same way
as z-tests did, following the four-step process of
For example: the null hypothesis states that the infants have no preference for either face.
That is, they should average half of the 20 seconds looking at each of the two faces. In
symbols, the null hypothesis states
H0 : μ attractive = 10 seconds
The alternative hypothesis states that there is a preference and one of the faces is preferred
over the other. A directional, one-tailed test would specify which of the two faces is
preferred, but the nondirectional alternative hypothesis is expressed as follows:
H1 : μ attractive ≠ 10 seconds
The test statistic is a t statistic because the population variance is not known. Therefore, the
value for degrees of freedom must be determined before the critical region can be located.
Step 3: Calculate the test statistic.
The t statistic typically requires more computation than is necessary for a z-score. Therefore,
the calculations is divided into a three-stage process as follows.
a) First, calculate the sample variance. Remember that the population variance is
unknown, and you must use the sample value in its place. (This is why we are using a
t statistic instead of a z-score.)
b) Next, use the sample variance (s2 ) and the sample size (n) to compute the estimated
standard error. This value is the denominator of the t statistic and measures how much
difference is reasonable to expect by chance between a sample mean and the
corresponding population mean.
When the obtained difference between the data and the hypothesis (numerator) is much
greater than expected (denominator), we obtain a large value for t (either large positive or
large negative). In this case, we conclude that the data are not consistent with the hypothesis,
and our decision is to “reject H0 .” On the other hand, when the difference between the data
and the hypothesis is small relative to the standard error, we obtain a t statistic near zero, and
our decision is “fail to reject H0 .”
TYPES OF t- TEST
One-sample T-test is a statistical hypothesis testing technique in which the mean of a sample
is tested against a hypothesized value, e.g., a population mean. The t-test is used to determine
whether the difference between the sample mean and the hypothesized value, e.g., the
population mean is statistically significant or not. T-test is used for hypothesis testing of one-
sample mean when the population standard deviation is unknown and the sample size is
small. The distribution used is T-distribution with certain degrees of freedom. A sample of
size lesser than 30 observations is considered as a small sample.
t=
Where, is the sample mean, μ is the hypothesized population mean, S is the standard
deviation of the sample and n is the number of sample observations.
When working with T-test, T-distribution is used in place of the normal distribution. The t-
distribution is a family of curves that are symmetrical about the mean, and have increasing
variability as the degrees of freedom increase. The t-test statistic (T) follows a t-distribution
with n – 1 degrees of freedom, where n is the number of observations in the sample.
Null hypothesis, H0: There is no difference between the sample mean and the population
mean
Alternate hypothesis, Ha: There is a significant difference between the sample mean and the
population mean.
Independent sample t-test is a statistical technique that is used to analyze the mean
comparison of two independent groups. In independent samples t-test, when we take two
samples from the same population, then the mean of the two samples may be identical. But
when samples are taken from two different populations, then the mean of the sample may
differ. In this case, it is used to draw conclusions about the means of two populations, and
used to tell whether or not they are similar.
The independent-measures t statistic uses the data from two separate samples to draw
inferences about the mean difference between two populations or between two different
treatment conditions. The formula for the independent-measures t statistic has the same
structure as the original z-score or the single-sample t:
t=
For the independent-measures t, the sample statistic is the sample mean difference (M1 −
M2). The population parameter is the population mean difference, (µ1 − µ2). The estimated
standard error for the sample mean difference is computed by combining the errors for the
two sample means. The resulting formula is
t=
S=
This t statistic has degrees of freedom determined by the sum of the df values for the two
samples:
For hypothesis testing, the null hypothesis states that there is no difference between the two
population means:
H0 : µ1 = µ2 or µ1 − µ2 = 0
The paired t-test gives a hypothesis examination of the difference between population means
for a set of random samples whose variations are almost normally distributed. Subjects are
often tested in a before-after situation or with subjects as alike as possible. The paired t-test is
a test that the differences between the two observations are zero.
The paired t-test is a test that the differences between the two observations are zero.Let us
assume two paired sets, such as Xi and Yi for i = 1, 2, …, n such that their paired difference
are independent which are identically and normally distributed. Then the paired t-test
concludes whether they notably vary from each other.
The data is taken from subjects who have been measured twice.
95% confidence interval is obtained from the difference between the two sets of
joined observations.