Statistics - (Student's) t-test (Mean Comparison)

Thomas Bayes

About

The t-test is a test that compares means.

T-tests:

The two last ones are really common.

A t-test is a parametric statistic.

History

The Sutdent's t-test was developed by William Gossett in 1908. He was not only a statistics expert, but he was also a beer expert. He monitored the quality of stout beer at the Guinness brewery in Dublin, Ireland. He wanted to be empirical about it, and he sort of randomly assigned different things to different batches and then, developed this test to compare means.

But the management at Guinness were so protective of their brand, that they did not want William Gossett to share his procedures with anyone else. They didn't even want him to publish this in an academic journal.

They convinced him to publish under the name student.

More: Wine, Beer, and Statistics

Test statistic

Definition

  • the z-test is used when comparing a sample mean to a population mean, and the population standard deviation is known.
  • the single sample t-test is used when comparing a sample mean to a population mean and the population standard deviation is not known.

The z-test and the single sample t-test are pretty rare because the population parameters are typically not known.

  • A dependent t-test is appropriate when we have the same people measured twice. We can calculate a different score and then see if the mean different score is signifigantly different from zero. If so, we have a significant change.
  • The independent t-test is appropriate when we want to compare two separate groups of people or two separate samples. For instance, if we want to compare one condition to another as men versus women.

Calculation

The z or t test statistic is some observed value minus an expected value relative to standard error.

<MATH> \text{z or t} = \frac{(\text{Observed} - \text{Expected})}{\href{Standard_Error}{\text{Standard Error}}} </MATH>

Test Observed Expected Standard Error
z Sample mean Population mean Standard Error of the mean
t (single sample) Sample mean Population mean Standard Error of the mean
t (dependent) Sample mean of difference score Population mean of difference score Standard Error of the mean difference
t (independent) Difference between two sample mean Difference between two population mean Standard Error of the difference between mean

In the dependent test, the observed is the sample mean of difference scores. As we have the same people measured twice, we can calculate the difference score for each individual, and then average the difference scores. That's not the case in the independent t-test as we have two different groups. In the independent t-test, we get the mean for the group one and the mean for group two, and then, look at the difference between the means.

p-value

The p-values for z and t (back to the central limit theorem) is dependent on:

  • whether the test is directional or non-directional
  • on the sample size. degree of freedom. Different t-distributions for different sample sizes.

degree of freedom

Test degree of freedom
z Non Applicable
t (single sample) <math>N - 1</math>
t (dependent) <math>N - 1</math>
t (independent) <math>(N_1 - 1) + (N_2 - 1)</math>

Example

Preferences comparison for a political candidate.

  • In the 1st study you recruit liberals and conservatives and have them rate their likelihood to vote for the candidate. → independent t-test
  • In the 2nd study you ask a group to rate their likelihood to vote for the candidate before and after the candidate makes a speech. dependent t-test
  • In the 3rd study, you compare your group’s preference for the candidate to the voting population. → single sample t-test

???? Taking a sample size of 10, you find that your group performs 1.5 units of standard error higher the population mean for the test. You can then conclude that your group is not significantly different from the population. ????





Discover More
Mean
Distribution - (Mean|Average) (M| | )

The average is a measure of center that statisticians call the mean. To calculate the mean, you add all numbers and divide the total by the number of numbers (N). The mean is not resistant. The...
Thomas Bayes
Statistical - Inference

Methods for drawing conclusions a population from sample data Two key methods Hypothesis tests (significance tests) Confidence intervals E.g., t-test – enables inferences population beyond our...
Card Puncher Data Processing
Statistics - (Non) Parametrics (method|statistics)

Parametric statistics is a branch of statistics. A Parametric method, such as t-tests is a method that is based on fixed assumption that the sample data comes from a population that follows a probability...
Thomas Bayes
Statistics - (dependent|paired sample) t-test

A dependent t-test is appropriate when: we have the same people measured twice. the same subject are been compared (ex: Pre/Post Design) or two samples are matched at the level of individual subjects...
Card Puncher Data Processing
Statistics - Levene's test (Homogeneity variance test)

A Levene's test is essentially like a t-test but instead of comparing means it's comparing variances. If the test is significant, the homogeneity variance assumption is violated but we have a significant...
Card Puncher Data Processing
Statistics - Null Hypothesis Significance Testing (NHST)

NHST is a procedure for testing the Null Hypothesis. It's a binary decision: Reject or Retain the Null Hypothesis Ie Retain the Null Hypothesis or the alternative hypothesis. Before starting any...
Thomas Bayes
Statistics - Power of a test

The power of a test sometimes, less formally, refers to the probability of rejecting the null when it is not correct, the chance that your experiment is right. A test's power is influenced by the choice...
Thomas Bayes
Statistics - independent t-test

A dependent t-test is appropriate when you want to compare two independent samples. (two completely different groups of entities). For examples: if we want to compare one condition to another as men...



Share this page:
Follow us:
Task Runner