# 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.

1,148 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
920 views

### How can I do a t-test on 2D data?

How can I do a t-test on 2D data with latitude and longitude attributes? I have 2 clusters of similar coordinates but in different time, I want to do a t-test to see if they are statistically ...
2k views

### Appropriate tests on discrete and paired data

I am going back and forth on which tests to do. I have two paired variables, that are both positive integers (0,1,2,3...etc). $n = 559$. The variables represent the error resulting from two different ...
• 81
135 views

### Alternative distribution of $T^2$ statistic without Gaussian assumption

Background Let $p(x)$ be an arbitrary distribution defined on $\mathbb{R}^d$. Define $\mu = \mathbb{E}[x]$. Given an i.i.d. sample $x_1, \ldots, x_n \sim p(x)$, consider the following $T^2$ statistic ...
• 2,023
322 views

### Is ANOVA always more powerful than a two-sample t-test when the data can be blocked?

I am trying to compare the efficacy of two devices. Three different operators tested each device for a parameter of interest (the same 3 operators for each device) and yielded two data sets for each ...
• 377
448 views

### T tests on proportions - Wrong, but how wrong?

Background: In psychology, and probably a number of other disciplines, it's common practice to test between-groups effects on a binary variable, such as accuracy, by aggregating data within ...
• 5,681
173 views

### Why use the student's t-test rather than z-score?

Suppose we are given IID r.v's $X_1, \ldots, X_n$ that are not necessarily normally distributed. Mean $\mu$ and standard deviation $\sigma$ are unknown and we want to construct a confidence interval ...
732 views

### appropriate hypothesis test for non-negative quantity

This question is intentionally written in a very abstract way, because I am interested in a generic solution, or for pointers to different possible concrete cases in different fields: I am measuring ...
• 3,019
60 views

### Three versions of the independent two sample t-test (and R)

This post concerns three versions of the independent two sample t-test: Student's t-test uses a pooled standard deviation in the denominator (all equations are shamelessly copied from Wikipedia - ...
• 356
138 views

### Photo attractiveness rating experiment: significance and effect size

I'm a photographer working on a personal project where I experimentally test dating photo advice. I take photos of people under different conditions, changing one variable while keeping others ...
38 views

### Paired sample: Two-tailed and one-tailed

In the book: "Essentials of Statistics for Business & Economics", the part about matched sample t-test, I see that it uses the two-tailed t-stat. However, instead of stating the null and alternate ...
• 41
141 views

### z-scores after glht

After fitting a model with lme, I run post-hoc tests with glht (with specific hypotheses specified in ph_conditional, and not multiple comparisons). The results are repored in the following: ...
• 487
91 views

### So many ways to calculate the t-statistic - is this the 'super-formula' I need to yield all the different forms?

I've noticed that the formula for the t-statistic takes on a number of forms depending on the nature of the test being performed, i.e.,: one sample independent samples (equal variances) independent ...
• 361
274 views

### Only interested in select pairwise comparisons - Do I need to run an ANOVA first?

I have data with two biological factors. The first factor has 2 levels (say, Alive vs. Dead) and the second factor has 80 levels (protein of interest). I'm only interested in whether the mean value ...
• 2,212
229 views

### Comparing the performance of two classifiers using cross-validation

Consider the following excerpt (paraphrased, see sec. 4.6.3 for original wording) from Introduction to Data Mining (free chapter) by Pang-Ning Tan, Michael Steinbach, and Vipin Kumar. Suppose we ...
• 196
103 views

### How is two-sample ANOVA the same as two-sample t-test?

When testing the differences between the means of two groups, I'm aware that one can use the ANOVA test, and/or the ...
• 2,019
451 views

### Visualization of normality condition for t-test in R

I am working through the concept of the need for normality in the underlying population when performing a t-test. This is nicely expounded by @Glen_b here. The gist of the explanation, I think, is ...
• 24.2k
2k views

### Does Little's MCAR test make sense?

Now I'm reading Applied Missing Data Analysis by Craig K. Enders ,and I try to understand why we do Little's MCAR test ? . On page 17 he wrote the following : In truth, testing whether an entire ...
• 1,543
106 views

### is it legitimate to t-test between statistics of a bootstrap?

say I have two samples $x_1$ and $x_2$ and a function which calculates a statistic out of each sample, denotes as $f(x)$. I would like to test the significance of the difference $f(x_1)-f(x_2)$. A ...
505 views

### Basic methods for detecting outliers

Let $X$ be a matrix of $n$ rows and $m$ columns. $n$ is the number of samples and $m$ is the number of gene expressions. Gene expressions are basically numerical continuous values. Assume we have a ...
• 125
902 views

### Central limit theorem: applicability for assumptions of different tests

Since many statistical procedures (e.g. t-test, ANOVA, Pearson’s r (for efficient estimates)) require the normal distribution of the tested variables ('normality-assumption') one may ask if (at least) ...
71 views

### Is the increase in Type I errors due to multi-sample t-tests overstated?

To illustrate, let's say you want to compare the means of 3 samples with t-tests. You would then have to run 3 tests to compare the means of each possible combination of samples. The explanations I ...
• 377
762 views

### chi-squared test vs fisher's test vs ... => highly unbalanced length frequency data

I would like to statistically verify if two distributions are identical. Basically, the first distribution is a length frequency distribution from a large population ("population"). The second is the ...
• 175
391 views

### Independent t-tests and Technical Indicators: Voodoo, Axes, and Objectivity

First off, I'm not trying to crowd source a personal printing press (i.e., not doing this: "I'm using strategies $x$, $y$, $z$ in the stock market and..."). Instead, I'm looking for feedback on ...
• 61
125 views

### Comparing performance after CV over a single dataset : does it violate the independence assumption?

Cross validation lets us get multiple estimates of the generalization performance of an algorithm when the performance cannot be estimated for each example independently. (As with an F1-score, we ...
86 views

### How to reason about infinite values in hypothesis testing?

This question might not have a practical use, as infinite values rarely, if ever, come up during data analysis, but I encountered it while implementing hypothesis tests in statistical software, ...
• 4,397
82 views

### One Sample T-Test - Data Transformation

I apologize in advance is this question seems very elementary. It has been a long time since I have dabbled in significance tests and I can't seem to find an answer to this anywhere else. I have a ...
• 31
541 views

### R function for weighted two-sample t-test **with Welch-adjusted t statistic**?

I'm conducting a hypothesis test for the difference between two groups. The file dat1 contains all observations of measure for ...
• 135
28 views

• 1,630
309 views

### Kolmogorov Smirnoff test result vs paired t-test result

I have a set of medical data which contains two samples taken in different time periods. Although the samples do not strictly contain the same people in each group, a large proportion in each group ...
• 437
30 views

### Comparing two computer generated datasets

I have created an artificial stock market where different groups of traders trade with each other and therefore influence the asset price as well as the returns on the asset. The model generates 10k+ ...
• 41
534 views

### Normality assumption for t/z tests

I have what is probably a silly question regarding normality assumptions for t/Z tests. As I understand, t/z tests require that sample data was obtained from populations following a normal ...
• 307
3k views

### How to test if one value is significantly different from two others?

I'm analysing classroom interaction data. I'm using a simple quantitative index counting the number of interactions of a certain kind. I want to know if it significantly changed between years 1 and 2, ...
274 views

### Statistical method comparing difference in extreme percentile

Statistical methods like wilcox.test to t.test test differences in medians or means. I would like to compare the difference in ...
• 532
109 views

### t-test with drift in reference distribution

I wonder whether I am behaving correctly with my Student t-test exercise. I am continuously testing a small data sample of metal-detector antenna readings against a calibration sample distribution. ...
• 163
84 views

### Is a T-Test a suitable model for this data?

Sorry, I asked a question similar to this yesterday but I realized I may have been wrong in my assumptions so I deleted that question and posted this new one now (I'm fairly new to stats so I'm ...
580 views

### Comparing parameters of two nonlinear models

Suppose we use nonlinear regression (specifically the nls-package in R) for fitting separate models (e.g. same equation, different values of parameters) for two (or more for that matter) conditions in ...
• 31
98 views

### When can I use a permutation test to see if means of two distributions differ without Type I errors?

I am analyzing psych experiments which generally take the form of a list of outcome measures for the test and control groups, with roughly equal sample sizes, and I would like to compare their means ...
72 views

### How to create data agreeing with study results?

I'm teaching hypothesis testing at a high school and came across this "study" on "Chocolate causes weight loss". I'd really like to look at it in class with my students and not only discuss its maths ...
• 151
2k views

### Why t-test of correlation coefficient can't be used for testing non-zero?

t-test of a correlation coefficient is used for testing the sample correlation against population correlation of zero. To test an assumed value of the population coefficient other than zero, we should ...
• 6,887
220 views

### dependent or independent t test?

Suppose I have a dataset with 1,000 people and they rating 5 shampoos across a number of attributes (cost, smell, texture, how well it cleans). If I wanted to compare the average of an attribute ...
• 151
### "Accept" null in $t$-test
Let the random variables $X \sim \mathcal{N} \left( \mu_1, \sigma^2_1 \right)$ and $Y \sim \mathcal{N} \left( \mu_2, \sigma^2_2 \right)$. Take the samples $x_1, \dots, x_{n_1} \in X$ and \$y_1, \dots, ...