Questions tagged [t-test]

A test for comparing the means of two samples, or the mean of one sample (or even parameter estimates) with a specified value; also known as the "Student t-test" after the pseudonym of its inventor.

A statistical test is a t-test, if it meets the following criteria: (1) It compares a sample statistic to a reference value, (2) divides the difference by a standard error, (3) whose variance is estimated from the same data (i.e., there is some uncertainty about its value), and (4) has a result that is distributed as t. The prototypical example of a t-test is comparing the means of two samples, for example: $$ t=\frac{\bar X_1-\bar X_2}{\sqrt{s^2_\text{pooled}\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}} $$ This specific example applies only to cases where the variances are equal, the samples are independent, and the reference value is $0$. However, the t-test is broader; there are versions that address single samples, specified reference values, unequal group variances, and dependent samples. The t-test is also used in other settings, such as to assess parameter estimates (i.e., $\hat\beta$s) in linear models.

3254 questions
124
votes
7 answers

How to choose between t-test or non-parametric test e.g. Wilcoxon in small samples

Certain hypotheses can be tested using Student's t-test (maybe using Welch's correction for unequal variances in the two-sample case), or by a non-parametric test like the Wilcoxon paired signed rank test, the Wilcoxon-Mann-Whitney U test, or the…
107
votes
7 answers

T-test for non normal when N>50?

Long ago I learnt that normal distribution was necessary to use a two sample T-test. Today a colleague told me that she learnt that for N>50 normal distribution was not necessary. Is that true? If true is that because of the central limit theorem?
90
votes
10 answers

Is there a minimum sample size required for the t-test to be valid?

I'm currently working on a quasi-experimental research paper. I only have a sample size of 15 due to low population within the chosen area and that only 15 fit my criteria. Is 15 the minimum sample size to compute for t-test and F-test? If so, where…
84
votes
9 answers

Why is it possible to get significant F statistic (p<.001) but non-significant regressor t-tests?

In a multiple linear regression, why is it possible to have a highly significant F statistic (p<.001) but have very high p-values on all the regressor's t tests? In my model, there are 10 regressors. One has a p-value of 0.1 and the rest are above…
61
votes
6 answers

Which permutation test implementation in R to use instead of t-tests (paired and non-paired)?

I have data from an experiment that I analyzed using t-tests. The dependent variable is interval scaled and the data are either unpaired (i.e., 2 groups) or paired (i.e., within-subjects). E.g. (within subjects): x1 <- c(99, 99.5, 65, 100, 99,…
Henrik
  • 13,314
  • 9
  • 63
  • 123
61
votes
4 answers

How are regression, the t-test, and the ANOVA all versions of the general linear model?

How are they all versions of the same basic statistical method?
59
votes
2 answers

How should one interpret the comparison of means from different sample sizes?

Take the case of book ratings on a website. Book A is rated by 10,000 people with an average rating of 4.25 and the variance $\sigma = 0.5$. Similarly Book B is rated by 100 people and has a rating of 4.5 with $\sigma = 0.25$. Now because of the…
PhD
  • 13,429
  • 19
  • 45
  • 47
57
votes
4 answers

Manually Calculating P value from t-value in t-test

I have a sample dataset with 31 values. I ran a two-tailed t-test using R to test if the true mean is equal to 10: t.test(x=data, mu=10, conf.level=0.95) Output: t = 11.244, df = 30, p-value = 2.786e-12 alternative hypothesis: true mean is not…
herbps10
  • 673
  • 1
  • 5
  • 6
51
votes
7 answers

When conducting a t-test why would one prefer to assume (or test for) equal variances rather than always use a Welch approximation of the df?

It seems like when the assumption of homogeneity of variance is met that the results from a Welch adjusted t-test and a standard t-test are approximately the same. Why not simply always use the Welch adjusted t?
russellpierce
  • 17,079
  • 16
  • 67
  • 98
51
votes
4 answers

If the t-test and the ANOVA for two groups are equivalent, why aren't their assumptions equivalent?

I'm sure I've got this completely wrapped round my head, but I just can't figure it out. The t-test compares two normal distributions using the Z distribution. That's why there's an assumption of normality in the DATA. ANOVA is equivalent to linear…
Chris Beeley
  • 5,465
  • 5
  • 36
  • 40
47
votes
4 answers

Bayesian equivalent of two sample t-test?

I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
John
  • 501
  • 1
  • 5
  • 3
43
votes
5 answers

How to perform two-sample t-tests in R by inputting sample statistics rather than the raw data?

Let's say we have the statistics given below gender mean sd n f 1.666667 0.5773503 3 m 4.500000 0.5773503 4 How do you perform a two-sample t-test (to see if there is a significant difference between the means of men and women in some variable)…
Alby
  • 2,103
  • 3
  • 19
  • 22
41
votes
8 answers

How to test hypothesis of no group differences?

Imagine you have a study with two groups (e.g., males and females) looking at a numeric dependent variable (e.g., intelligence test scores) and you have the hypothesis that there are no group differences. Question: What is a good way to test…
Jeromy Anglim
  • 42,044
  • 23
  • 146
  • 250
40
votes
3 answers

Significance contradiction in linear regression: significant t-test for a coefficient vs non-significant overall F-statistic

I'm fitting a multiple linear regression model between 4 categorical variables (with 4 levels each) and a numerical output. My dataset has 43 observations. Regression gives me the following $p$-values from the $t$-test for every slope coefficient:…
34
votes
2 answers

How to statistically compare the performance of machine learning classifiers?

Based on estimated classification accuracy, I want to test whether one classifier is statistically better on a base set than another classifier . For each classifier, I select a training and testing sample randomly from the base set, train the…
entropy
  • 1,122
  • 2
  • 12
  • 21
1
2 3
99 100