How Do We Decide If The Medication Was Successful in Lowering The Patient's Concentration of Blood Glucose?
How Do We Decide If The Medication Was Successful in Lowering The Patient's Concentration of Blood Glucose?
1. are independent
2. are (approximately) normally distributed
3. have a similar amount of variance within each group being compared
(homogeneity of variance)
If your data do not fit these assumptions, you can try a non-parametric
alternative to the t-test, such as the Wilcoxon Signed-Rank test for data with
unequal variances.
What type of t-test should be used?
When choosing a t-test, you will need to consider two things: whether the
groups being compared come from a single population or two different
populations, and whether you want to test the difference in a specific
direction.
One-sample, two-sample, or paired t-test?
If the groups come from a single population (e.g. measuring before and
after an experimental treatment), perform a paired t-test.
If the groups come from two different populations (e.g. two different
species, or people from separate cities), perform a two-sample t-
test or independent t-test.
If these is one group being compared against a standard value (e.g.
comparing the acidity of a liquid to a neutral pH of 7), perform a one-
sample t-test.
One -tailed or two-tailed t-test?
If you only care whether the two populations are different from one another,
perform a two-tailed t-test.
If you want to know whether one population mean is greater than or less
than the other, perform a one-tailed t-test.
F Test
F test is a test that uses the F-distribution to test a hypothesis. In most
cases, it refers to the F-test to compare two variances. It also uses a variety
of test including regression analysis, the Chow test, and the Scheffe test.
F test is used to compare two variances by dividing them. If variances are
equal, the ratio of variances will be equal to 1.
General Steps for F-Test:
One-Way ANOVA
The purpose of a one-way ANOVA test is to determine the existence of a statistically significant
difference among several group means. The test actually uses variances to help determine if the
means are equal or not. In order to perform a one-way ANOVA test, there are five
basic assumptions to be fulfilled:
The null hypothesis is simply that all the group population means are the same. The alternative
hypothesis is that at least one pair of means is different. For example, if there are k groups:
: At least two of the group means are not equal. That is, for
some .
The graphs, a set of box plots representing the distribution of values with the group means
indicated by a horizontal line through the box, help in the understanding of the hypothesis test. In
the first graph (red box plots), H0: μ1 = μ2 = μ3 and the three populations have the same
distribution if the null hypothesis is true. The variance of the combined data is approximately the
same as the variance of each of the populations.
If the null hypothesis is false, then the variance of the combined data is larger which is caused by
the different means as shown in the second graph (green box plots).
(a) H0 is true. All means are the same; the differences are due to random variation.
(b) H0 is not true. All means are not the same; the differences are too large to be
due to random variation.
Analysis of Variance
also referred to as ANOVA, is a method of testing whether or not the means of three or more
populations are equal. The method is applicable if:
The distribution used for the hypothesis test is a new one. It is called the F distribution, invented
by George Snedecor but named in honor of Sir Ronald Fisher, an English statistician.
The F statistic is a ratio (a fraction). There are two sets of degrees of freedom; one for the
numerator and one for the denominator.
For example, if F follows an F distribution and the number of degrees of freedom for the
numerator is four, and the number of degrees of freedom for the denominator is ten,
then F ~ F4,10.
1. Variance between samples: An estimate of σ2 that is the variance of the sample means multiplied
by n (when the sample sizes are the same.). If the samples are different sizes, the variance
between samples is weighted to account for the different sample sizes. The variance is also
called variation due to treatment or explained variation.
2. Variance within samples: An estimate of σ2 that is the average of the sample variances (also
known as a pooled variance). When the sample sizes are different, the variance within samples is
weighted. The variance is also called the variation due to error or unexplained
variation.
SSbetween = the sum of squares that represents the variation among the different samples
SSwithin = the sum of squares that represents the variation within samples that is due to chance.
To find a “sum of squares” means to add together squared quantities that, in some cases, may be
weighted. We used sum of squares to calculate the sample variance and the sample standard
deviation in (Figure).
MS means “mean square.” MSbetween is the variance between groups, and MSwithin is the variance
within groups.
SSbetween =
Unexplained variation: sum of squares representing variation within samples due to
chance:
df‘s for different groups (df‘s for the numerator): df = k – 1
Equation for errors within samples (df‘s for the denominator): dfwithin = n – k
The one-way ANOVA test depends on the fact that MSbetween can be influenced by population
differences among means of the several groups. Since MSwithin compares values of each group to
its own group mean, the fact that group means might be different does not affect MSwithin.
The null hypothesis says that all groups are samples from populations having the same normal
distribution. The alternate hypothesis says that at least two of the sample groups come from
populations with different normal distributions. If the null hypothesis is
true, MSbetween and MSwithin should both estimate the same value.
Note
The null hypothesis says that all the group population means are equal. The
hypothesis of equal means implies that the populations have the same normal
distribution, because it is assumed that the populations are normal and that they
have equal variances.
F-Ratio or F Statistic
If MSbetween and MSwithin estimate the same value (following the belief that H0 is true), then the F-
ratio should be approximately equal to one. Mostly, just sampling errors would contribute to
variations away from one. As it turns out, MSbetween consists of the population variance plus a
variance produced from the differences between the samples. MSwithin is an estimate of the
population variance. Since variances are always positive, if the null hypothesis is
false, MSbetween will generally be larger than MSwithin.Then the F-ratio will be larger than one.
However, if the population effect is small, it is not unlikely that MSwithin will be larger in a given
sample.
The foregoing calculations were done with groups of different sizes. If the groups are the same
size, the calculations simplify somewhat and the F-ratio can be written as: