Test Formula Assumption Notes Source Procedures That Utilize Data From A Single Sample
Test Formula Assumption Notes Source Procedures That Utilize Data From A Single Sample
Formula
Assumption
Notes
Source
Data is non-normally distributed, even after log transforming. This test makes no assumption about the shape of the population distribution, therefore this test can handle a data set that is nonsymmetric, that is skewed either to the left or the right Normal appox to sign test works well for n 40 For 40 n 100, approx better using the following adjustment:
you are either testing to see whether the observation is a good estimate of the median, or whether it falls within confidence levels set around that median.
LargeSample Approx.
1. Let Zi = Yi Xi for i = 1, ... , n. The differences Zi are assumed to be independent. 2. Each Zi comes from a continuous population (they must
To form the signed rank test, compute di = Xi - Yi where X and Y are the two samples. Rank the di without regard to sign. Tied values are not included in the Wilcoxon test.
After ranking, restore the sign (plus or minus) to the ranks. Then compute W+ and W- as the sums of the positive and negative ranks respectively. If the two population means are in fact equal, then the sums of the ranks should also be nearly equal. If the difference between the sum of the ranks is too great, we reject the null hypothesis that the population means are equal.
1. If n is large, use the variance adjusted for ties in the normal approximation 2. If n is small and there are ties, need to compute the null distribution from permutation principles, i.e., tables of critical values are not guaranteed to be correct in the presence of ties 1. If n is larger than 20 then the normal approximation to the binomial distribution can be used to estimate the P-value. Its best, however, to use a computer program which can compute the exact binomial P-value for even large sample sizes. 2. The sign test is distribution free; that is, no assumptions about the distribution of weights
1. If there are 2 or more observations with the same value of Y 0, the observations are said to be tied 2. For tied observations we assign the average rank or midrank 1. Generally, if the distribution is symmetric and the near normality conditions satisfied, then the t-test will give a lower P-value than the sign test. This means that the t-test can more easily detect a difference than the sign test and so is more powerful than the sign test if the conditions
~N(0,1)
i.c) Confidenc e Interval for Median Based on Signed Test
For n
in the population is necessary. The test is valid for any sample size no matter what the distribution looks like, whether normal, skewed, bimodal, etc 3. The sign test still assumes, as do all inference procedures we have studied, that the sample values are a random sample from the population of interest. It also assumes that the variable is quantitative and not categorical.
for its use are satisfied. 2. If the near normal conditions are not satisfied, then the t-test may be less powerful than the sign test since outliers can make it hard to detect deviations from the null hypothesis with the t-test (outliers affect the mean and inflate the standard deviation). The sign test is insensitive to outliers As the number of scores used, n, increases, the distribution of all possible ranks S tends towards the normal distribution. So although for n 20, exact probabilities would usually be calculated, for n > 20, the normal approximation is used. The recommended cutoff varies from textbook to textbook here we use 20 although some put it lower (10) or higher (25)
n.pdf
i. From the sample observations i. X1, X2, , Xn form all possible averages. uij = [Di+Dj]/2, 1 i j n ii. Arrange the uijs in order of magnitude from smallest to largest iii. The median of the uijs provides a point estimate of the population median iv. sample size and the appropriate value of P as determined by the desired level of
1. The population should be Symmetric 2. The theory was attributed to Tukey and discussed by Noether and Giobbons 3. The 100(1- ) confidence interval for Median (M) consists of those values of M for which we would not reject the two-sided null hypothesis Ho: M = Mo at a certain level
confidence. When (1- ) is the confidence coefficient, P = /2. When the exact value of /2 cannot be found on the table choose a neigboring value--either the closest value or one that is larger or smaller than /2, depending on whether a slightly wider or slightly narrower interval than desired is more acceptable v. The endpoints of the confidence interval are the Kth smallest and the Kth largest values of uij.. K = T +1, where T is the value of P selected in step iv.
LargeSample Approxim ation
Tmean = Tstd =
1. Find the mean and standard deviation of Tplus 2. under random permutations assuming no ties
large sample (also called "asymptotic") approximations to sampling distributions of test statistics. Why use an approximation when the computer can do it exactly? However, the computer can't do it exactly for really large n. The functions psignrank and qsignrank crash when n is larger than about 50. The
code in the preceding section is worse. It will crash when n is larger than about 20. Thus the need for large sample approximation.
The normal approximation for the Binomial test assumes that the proportion of the time that individuals are expected to fall into category A (symbolized by "p") multiplied by the total number of individuals in category A and B combined (symbolized by "n") is greater than 10 (i.e. pn>10) and that the proportion of the time that individuals are expected to fall into category B (symbolized by "q") multiplied by the total number of individuals is greater than 10 (i.e. qn>10). If either of these conditions are not met then the normal approximation for the binomial test should not be used (use the Binomial distribution instead). 1. Accurate in samples as small an n = 10 2. Seeks population parameter p
For large samples such as this example, the binomial distribution is well approximated by convenient continuous distributions, and these are used as the basis for alternative tests that are much quicker to compute, Pearson's chi-square test and the G-test. However, for small samples these approximations break down, and there is no alternative to the binomial test.
1. Based on a Wilson score method 2. Superior to regular large sample methods 3. Easy to calculate
PROCEDURES THAT UTILIZE DATA FROM 2 INDEPENDENT SAMPLES i. Making inferences about the difference between 2 location parameters
i.a) Median Test
1. Observations are independent both within and between samples 2. The distributions of the populations the samples were drawn from all have the same shape
Where:
These are the same as for the sign test. The median test is very robust against outliers, and fairly robust against differences in the shapes of the distributions. The median test has poor power for normally distributed data, even worse power for shorttailed distributions, but good relative power for heavytailed (outlier-rich) distributions In addition, the strict validity of standard tables of critical values may rely on the assumption that the underlying cumulative probability distribution function of both samples is continuous, so that ties are essentially impossible. In cases where this assumption is invalid, there is a choice between using adjustment procedures to account for ties in a reasonable but approximate way or using computational techniques
1. The two samples under investigation in the test are independent of each other and the observations within each sample are independent. Where: 2. The observations are comparable (i.e., for any two observations, one can assess whether they are equal or, if not, which one is greater).
where mU and U are the mean and standard deviation of U, is approximately a standard normal deviate whose significance can be checked in tables of the normal distribution. mU and U are given by
1. The formula for the standard deviation is more complicated in the presence of tied ranks 2. If the number of ties is small (and especially if there are no large tie bands) ties can be ignored when doing calculations by hand. The computer statistical packages will use the correctly adjusted formula as a matter of routine
Since U1 + U2 = n1n2, the mean (n1n2)/2 used in the normal approximation is the mean of the two values of U. Therefore, the absolute value of the z statistic calculated will be same whichever value of U is used.
N = m + n,Assign rank 1 to the smallest and the largest observation. Assign rank 2 to the second smallest and second largest observation, If N is even,the array of ranks will be (1, 2, 3, ,N/2,N/2,, 3, 2, 1). If N is odd,the array of ranks is (1,
The assumption of equal medians is essential. If not,w e at least need that the two medians are known,i n which case we can obtain the data from each sample with each median subtracted!
The parameter of interest is = 2/1,t he ratio of the scale parameters. Assume that i are independent random variables from a distribution with median 0. If the variances of the two populations exist (they need not!),then 2 is the ratio of the variances
2, 3,, (N 1)/2, (N + 1)/2, (N 1)/2,, 3, 2, 1). Let Rj denote the rank of Yj (i.e.,r ank of the observations in the sample of Y s), j=1,.. n The statistic is:
Properties of W: Provided there are no ties,under H0 a) If N is even: Eo(AB) = m(m+ n + 2)/4, and Var0 (AB) = mn(m+n+ 2) (m+ n 2)/48(m+ n 1). b) If N is odd: E0(AB) = m(m+ n + 1)2/4(m+ n), and Var0(AB) = mn(m + n + 1) [3 + (m + n)2]/48(m+ n)2. Large-Sample Approximation: As min(m, n) ,
has a N(0, 1) distribution. This holds when N is even or odd iii. Some miscellaneous 2 sample test
Fisher Exact Test dieting not dieting totals me wome total n n a+ a b b c+ c d d a+ b+d n c
1. Fisher's exact test assumes that the row and column totals are known in advance 2. Fisher's exact test is very conservative, resulting in Type I error which is below the nominal significance level
Large-Sample Approximation :
Where:
With large samples, a chisquare test can be used in this situation. The usual rule of thumb is that the chisquare test is not suitable when the expected values in any of the cells of the table, given the margins, is below 10: the sampling distribution of the test statistic that is calculated is only approximately equal to the theoretical chi-squared distribution, and the approximation is inadequate in these conditions (which arise when sample sizes are small, or the data are very unequally distributed among the cells of the table).
PROCEDURES THAT UTILIZE DATA FROM 2 RELATED SAMPLES i. Procedure for testing hypothesis about location parameters
i.a)
1. Normality f difference
http://en.wikipedia.org/
Xi -Yi s for testing D 0. 2. The number of negative Xi -Yi s for testing D > 0. 3. The number of positive Xi -Yi s for testing D < 0. Use table to calculate the binomial probability for the p-value 2P( k, p=0.5) for testing D 0. P( k, p=0.5) for testing D > 0 or D < 0.
scores 2. Scores within group independent 3. No gain if samples not dependent (correlated) 4. Statisticallymatched = repeated
simply assesses how often the two measures in a pair differ in being above or below the median. In contrast to the Wilcoxon test, the sign test does not measure how much the pair differs. When the sign test returns a finding of non-significance ( p > .05), the researcher concludes that one cannot assume the two samples differ.
Calculate Di = Xi - Yi , do not use the observation if Xi = Yi and reduce n by 1. Rank | Di |. For same | Di |s the ranks are the average of the consecutive ranks of | Di |s as if they are not tied. Calculate T+, the sum of the ranks with positive Dis and T , the sum of the ranks with negative The test statistic is smaller of T+ or T for Ha: D 0; T for Ha: D > 0 and T+ for Ha: D < 0.
1. It is an analog of the 2sample t-test (paireddata) 2. From a normally distributed population, as the t-test does. But Wilcoxontest assumes the data comes from a symmetric distribution. Wilcoxon test does not require the data to come 3. If you cannot justify this assumption of symmetry, use the nonparametric 1-sample sign test, which does not assume a symmetric distribution.
If the P value is small, you can reject the idea that the difference is a due to chance and conclude instead that the population has a median distinct from the hypothetical value you entered.
If the P value is large, the data do not give you any reason to conclude that the population median differs from the hypothetical median. This is not the same as saying that the medians are the
same. You just have no compelling evidence that they differ. If you have small samples, the Wilcoxon test has little power. In fact, if you have five or fewer values, the Wilcoxon test will always give a P value greater than 0.05, no matter how far the sample median is from the hypothetical median
An interesting observation when interpreting McNemar's test is that the elements of the main diagonal contribute no information whatsoever to the decision if pre- or posttreatment condition is more favorable. The McNemar chi-square test is the procedure of choice assessing marginal homogeneity for repeated dichotomous measures. The research question of interest is whether or not is it reasonable to describe the marginal response rates for, say, a favorable one as equivalent
In statistics, McNemar's test is a non-parametric method used on nominal data to determine whether the row and column marginal frequencies are equal. It is named after Q. McNemar, who introduced it in 1947. It is applied to 2 2 contingency tables with a dichotomous categories with matched pairs of subjects.