0% found this document useful (0 votes)
38 views18 pages

Stats Final Notes

The document provides an overview of common statistical tests including chi-square tests, t-tests, ANOVA, and their assumptions and applications. Chi-square tests are used for categorical data and goodness of fit. T-tests compare means of two groups. ANOVA compares means of three or more groups. Non-parametric alternatives are discussed for when assumptions are violated.

Uploaded by

valkriez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views18 pages

Stats Final Notes

The document provides an overview of common statistical tests including chi-square tests, t-tests, ANOVA, and their assumptions and applications. Chi-square tests are used for categorical data and goodness of fit. T-tests compare means of two groups. ANOVA compares means of three or more groups. Non-parametric alternatives are discussed for when assumptions are violated.

Uploaded by

valkriez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Chi square

Goodness of fit test

• Input : categorical data

• Degree of Freedom (DF) = Degrees of freedom refers to the maximum number of logically independent values,
which are values that have the freedom to vary, in the data sample. Calculated by counting up the number of
distinct quantities that are used to describe your data and subtracting all of the constraints that they must satisfy.
• Non parametric test Xsquare =

Bigger Xsquare, higher chance


to reject H0
Association test

• The Chi-Square Test of Independence determines whether there is


an association between categorical variables (i.e., whether the variables
are independent or related). It is nonparametric.

• Effect size, using cramer V. The φ statistic is supposed to range


between 0 (no at all association) and 1 (perfect association). It
doesn’t always do this for bigger then 2x2, so V is prefered. This
does range from 0 (no at all) to 1(perfect).
Violation

- Fisher exact test – when expected frequencies are small. Function =


fisher.test()
- McNemar test – for categorical cases where independence is violated.
Function = mcnemar.test()
T Test
One sample t test

• Input : numeric data


• The one sample t test compares the mean of your sample data to a known value.
• The t distribution is similar to the normal distribution, but has “heavier” tails.
• Parametric test

• H0 = The mean is equal, H1 = the mean is different.


Independent sample t test (Student)

• Input : numeric.
• Compares the means for two groups.

• Assumptions
• Two group have same sd.
• Normality (qqplot, Shapiro wilk test)
• Independence
• Homogeneity of variance (levene test)
Independent sample t test (Welch)

• Input : numeric.
• Compares the means for two groups.

• Assumptions
• Normality (qqplot, Shapiro wilk test)
• Independence
• Homogeneity of variance (levene test)
Paired sample T test

• The paired sample t-test, sometimes called the dependent sample t-test, is a
statistical procedure used to determine whether the mean difference between
two sets of observations is zero. In a paired sample t-test, each subject or entity
is measured twice, resulting in pairs of observations.
T Test violation (Wilcoxon rank sum test)

• If data is non-normal you can is the Wilcoxon tests. It has


two forms: one-sample and two-sample. They are
nonparametric tests, but it is less powerful then a t-test.
Effect size

• Cohen himself defined it primarily in the context of an independent samples t-test, specifically the
Student test. In that context, a natural way of defining the effect size is to divide the difference between
the means by an estimate of the standard deviation. There are several different version in common usage,
the cohensD() function uses the method argument to distinguish between them. I’ll use d to refer to any
statistic that you calculate from the sample, and use δ to refer to a theoretical population effect
One sided t-test

- One sample specify one.sided = ‘greater’ or ‘less’


- Independent sample specify one.sided = ‘the expected larger group’
- Paired sample specify one.sided= the variable with expected larger mean
•Increased likelihood of smaller p-value if you get the directionality correct,
although if you are wrong, you will have a very large p-value
Anova

• the difference with a t-test is that there are more than 2 groups. In ANOVA the H0 and H1 are

• Within-group sum of squares: how different is each individual person from their own group mean, where is the group
mean
• Between-group sum of squares: variation that captures only the differences between groups. This is difference between
group means and grand mean
Effect size
• There’s a few different ways you could measure the effect size in an ANOVA, but the most commonly
used measures are η2 (eta squared) and partial η2. It refers to the proportion of the variability in the
outcome variable that can be explained in terms of the predictor.

Multiple comparison and post-hoc test.


• Pairwise ttest
• Correction for multiple testing
• Bonferonni correction. “multiply all your raw p-values by m (amount of separate tests)”
• Holm correction. The idea behind the Holm correction is to pretend that you’re doing the tests
sequentially; starting with the smallest (raw) p-value and moving onto the largest one.
Assumption

- Normality: the residuals are assumed to be normally distributed.


- Homogeneity of variance: we’ve only got the one value for the population standard deviation (i.e., σ),
rather than allowing each group to have its own value. (Levene Test)
- Independence: knowing one residual tells you nothing about any other residual. (qqplot, Shapiro test)

Violation (non parametric anova):


For the Kruskal-Wallis test, we’ll rank order all of these Yik values, and conduct our analysis on the ranked data.
Then we calculate the average rank given to observations is the kth group and the grand mean rank.
Once this is done calculate the squared deviations from the grand mean rank.
Factorial Anova

• In factorial designs, there is more than one grouping variable.


• SS Total is the total variation in the data. SS (A) and SS (B) are the amount of variation of the estimated
factor level mean around the overall mean.
Assumption

• Levene test for homogeneity of variance


• Normality of residuals

You might also like