They’re like z-tests, but for when we don’t know the population standard deviation.

Definitions

independent-samples t-test : parametric procedure used to test sample means from two independent samples

independent samples : samples created by selecting each participant for one condition without regard to the participants selected for any other condition

homogeneity of variance : the requirement that the populations represented in a study have equal variances ()

sampling distribution of differences between means : infinitely take samples from one population then plot the frequency distribution of their differed means (). In this distribution, is 0 (e.g. they’re equal)

pooled variance : Weight average of the sample variances in a two-sample t-test

effect size : the amount of influence that changing the conditions of the independent variable had on the dependent scores

Cohen’s d : A measure of effect in a two-sample experiment that shows the magnitude of the differences between the means

square point-biserial correlation coefficient : proportion of variance in dependent scores that is accounted for by the independent variable in a two-sample experiment

One sample t-test

A one-sample t-test assumes you have a one-sample experiment using interval or ratio scores.

Because the t-distribution changes shape based on the size of samples used (n), this changes what x value is at (e.g. it’s not just 1.96/1.645). You can look this value up in a t-table using the degrees of freedom (df). When df>=120, it’s basically the Normal Distribution.

When df gets large, they start bucketing the critical values into ranges (e.g. df=65, but you’ll only see df=60 & df=120). If it’s less than the small number (2.00 at ), you’re not significant. If it’s bigger than the big number (1.98), you are significant. If it’s somewhere in the middle, either use software like JASP/SPSS or do something called linear interpolation.

Steps:

  1. Create a 1 or 2 tailed and .
  2. Compute
    1. Compute and
    2. Compute
    3. Compute
  3. Use to find in the t-table

Another way to think of :

from math import sqrt
 
def t_obt(xbar, s2x,n,u):
  sxbar = sqrt(s2x/n)
  return (xbar-u)/sxbar

Determining population parameter w/ interval estimation

We can do this two ways: “point estimation” allows us to say mu is equal to our sample mean, but that is subject to sampling error.

Instead, we can use interval estimation, which results in a statement plus a margin of error. We calculate this by determining the highest likely value (i.e. ) that would still be represented by our sample mean. Because we want the upper and lower bounds, we always use the two-tailed version of .

The formula for confidence interval

Example

We are testing the optimisim scores for a group of men (Behavioral Sciences Stats pg 129) and have the following data. We are trying to test if

participantsscores (X)X^2
1981
2864
310100
4749
5864
6864
7636
8416
910100
sums70574
mean7.7777778

We can then calculate the estimated Standard Error, but first we need the estimated population variance:

then:

which we can then determine (note: mu is the thing we’re testing for in ; is the value we found that we need to compare to the critical value to determine if it’s significant):

given and , so there is sufficient evidence to reject the null hypothesis here.

Two sample t-test

We usually don’t know , so research often uses the two sample t-test. We presume that in condition 1, represents if you tested the population. Then, we can conduct an altered condition 2 to see how it changes relative to that presumptive .

The two sample test comes in two varieties: independent-samples t-test and the related-samples t-test. Independent-samples might be: You got a bunch of rats, gave half food A and half food B. See if there was a difference.

Related samples: You got a bunch of rats. You fed them food A. Tested them. Then fed them food B. Tested again. The two samples (A & B) are related (b/c they’re the same rats).

Effect size

This is “cool. It changed something.. but like.. how much did it move the needle?”

We can compute this two ways:

  • Cohen’s d (how much does this move the needle?)
  • proportion of variance accounted for (does it have a consistent effect?)

Cohen’s D

This measures the size of the changes in the scores.

Independent tests use Related tests use

Cohen proposed these guidelines:

d = .2small effect
d = .5medium effect
d = .8large effect

Proportion of variance accounted for

This measures how consistently the scores change.

Given this data from a related-sample study:

Before therapyAfter
105
116
127

We can see that there is some variance b/c of the independent variable (people b/c 10 != 11).

We describe this via “square point-biserial correlation coefficient”

if ,

Guidelines for interpreting:

< 0.9Small effect
> .10 < .25moderate / relatively common
> .25large / rare

ANOVA

When calculating effect size for ANOVA, we’re looking for eta squared .