User Tools

Site Tools


T-Tests & Linear Models


H1 Your hypothesis: This is what you are predicting. E.g. “there is a difference between conditions A and B on measure C.
H0 “Null-hypothesis”: This is the inverse of H1, “there will be no difference”,
or more precisely, “your manipulation of the independent variable(s) does not cause anything”.
Probability Chance may always affect the outcome of any measurement, to a greater or larger extent. Doing lots and lots of measurements can help us be more certain that our results are not a coincidence. That is expensive and takes time.
We can save time by cutting back on doing lots of measurements if we understand the effects of taking fewer measurements on the probability of getting things wrong.
Statistical test Helps us estimate the likelihood of us being wrong.
One- and Two-Tailed Tests Scenario: You measure something under two conditions, you expect there to be a difference between the measures. If you have strong suspicions that one measure will be higher than the other, you use a one-tailed test.
As you know, results of any experiment could be a coincidence. A statistical test helps us figure out what the probability of this is.
If we have a pre-determined idea of which direction a certain difference will be, our hypothesis is stronger than if our hypothesis simply says “there will be a difference”.
This needs to be taken into account in the statistical test, when figuring out if the result might have been a coincidence. For a hypothesis that specifies the direction of a difference, use one-tailed, otherwise use two-tailed.

Gathering Data

Example hypothesis “The fish in the North of Iceland is healthier than the fish in the South of Iceland.”
H1: Fish in the North are healthier
Sample 20 individual fish are tested.
Variables Dependent: Health. Independent: Oceanic area (N,S). Dependent variable is measured with the “famous Health Probe”.
Subject pool N=20; random sample. Specify by which means/method the randomness is generated and followed.
Gathering data Repeated measures: 20 measurements for indexes of health:
South:66,48, ….
What we have so far Basically, we have a bunch of measurements which came from two different parts of the country. They will probably have a different mean, median, etc. – it's unlikely that they will be equal. This difference, we would like to find out – is it a true representation of the actual fish population in each of these two different locations?
Sampling distribution How all the measurements are distributed (for both N and S).
Population distribution How the total fish population, in North, South (and everywhere else that may matter) is distributed on this measure of health.
Standard Deviation (SD) If the population is normally distributed, we will have 68.2% +/- 1 SD from the mean, 95% of the population +/- 2 SD from the mean, and 99% +/- 3 SD from the mean.
Illustration from wikipedia:
What we want to know How likely is it that the distribution of Health (as measured with the Health Probe) in the two separate samples (N,S) is a total coincidence?


A.k.a. “Student's t-test”
When to use To test the difference between two means, when the standard deviation of the population is unknown.
Input Data from two populations.
NB: Underlying assumption On the measure of health, the total fish population is normally distributed. We say that “The population is normally distributed.”
Standard deviation of sample We use this as an estimate of the (actual) population standard deviation, using measures from both North and South.
Output t-value, p-value
t-value A measure of the difference between (sample) populations.
p-value Probability value: The percent likelihood of this result being a coincidence is p*100.
Typical thresholds for p p<0.05 and p<0.01
…that is, the difference between two (sample) populations is “statistically significant” if the p-value is below either of these thresholds.
(Which one to use depends on the circumstances.)
One-sample and two-sample t-test In the fish example above we have two separate sample populations, hence we use two-sample t-test.
One-sample alternative names Matched-sample t-test, Paired t-test, Repeated-measures t-test.
More information

Linear Models: Regression Analysis

Purpose of Regression Analysis Discover a function that allows prediction of the values of dependent variable y based on values of independent variable x
Scatterplot Shows the distribution of y-values for given (sampled) x-values
First-order linear function Y = A + bX
Provides us with a single, straight line that gets as close to all the points in the scatterplot as possible (given that it is straight)
Residual For each x,y point, the distance to the line
How do we find the line? Least Squares Criterion: We select the linear function that will yield the smallest sum of squared residuals

Linear Correlation

Given a linear function Given an X-score, the predicted Y-score is given by the line. However, in reality the Y-score rarely falls straight on the line.
Need estimate of error We must estimate how closely real Ys (Y) follow the predicted Ys (Y')
The measure most commonly used Standard Error of Estimate
Formula for Std. Err. of Est.
What it tells us How far, on average, real Ys fall from the line
The smaller the Std. Err. of Est. is … … the better a predictor the line is
Main limitation of linear models Assumes – apriori! – a linear relationship


/var/www/ailab/WWW/wiki/data/pages/rem4/t-tests_and_linear_models.txt · Last modified: 2014/08/21 12:46 by thorisson