# What kind of sample do we require *in practice* for a t-test?

I'm a pure math guy, not a stats guy, so please bear with me. I will try to be as clear as I can.

Consider a basic $$t$$-test for a population mean. In Triola's Elementary Statistics (a freshman-level intro textbook) we are given the following two requirements:

1. The sample is a simple random sample.

2. Either or both of these conditions are satisfied: The population is normally distributed or $$n>30$$.

(The independence requirement is mentioned earlier in the book but, strangely, not in the secion on the $$t$$-test.)

Requirement #1 is extremely puzzling to me, because throughout the text (and in real life!) the samples are often not SRS's. Instead, Triola will sometimes remark, with no explanation I can find, that we can "treat" the samples as SRS's.

So, my question is twofold:

(Q1) What guiding principles or rules of thumb can be used to judge whether we can "treat" a sample as a SRS?

(Q2) Assuming I didn't overlook it, why is this not discussed in Triola's textbook?

Thanks guys!

• I would argue that neither of these two requirements are required. There are other acceptable sampling methods other than SRS, and normality is for the means not the data. Nov 30, 2022 at 14:32
• How do they define a 'simple random sample'? Nov 30, 2022 at 17:17
• @SextusEmpiricus It's the usual definition: Any sample of size n must have an equal probability of being selected as any other sample of size n. Nov 30, 2022 at 18:39

Hang on, there are additional problems with the author's statement than what you've mentioned.

Let's actually start in reverse.

Either or both of these conditions are satisfied: The population is normally distributed or 𝑛>30.

Neither of these are required, though the normality of the population distribution is sufficient. The restriction on sample size is the most puzzling and least justifiable. Thirty is not a magic number, it isn't like I can't do the t-test with fewer than 30 samples. This appears in many places, and I suspect it comes from the fact that the t-distribution is a good approximation to a standard normal when there are 30 or more degrees of freedom (which for a single mean implies more than thirty observations).

Secondly, while sufficient the requirement for normality is greatly exaggerated. A T statistic is defined as the ratio between a standard gaussian random variable $$Z$$, and the square root of a chi-square random variable divided by its degrees of freedom, $$\sqrt{X/\nu}$$. Here, $$Z$$ and $$X$$ are independent.

If the data come from a normal distribution, then the sample mean and standard error have the required distributions and are independent. If the data do not come from a normal distribution, the t test can still be used albeit at the expense of power and coverage of the confidence interval. See the Central Limit Theorem and Berry-Esseen theorem for justifications behind this.

The sample is a simple random sample.

I suppose the question should be "a simple random sample from which population"? I can still use the t test on a non-simple random sample, this just changes the interpretation of the result. I think this is the reason the author requires a SRS; the inference is intended to be at the population mean and concepts like "confounding" and selection boas are perhaps not appropriate for an elementary statistics book (or at least, I suspect the author might think so).

What guiding principles or rules of thumb can be used to judge whether we can "treat" a sample as a SRS?

The rule of thumb -- were I forced to make one -- would be that a sample is an SRS if inclusion in the sample is independent of any other factors.

As an example, a convenience sample is not an SRS. Why? Inclusion in the sample is associated with proximity to you, amongst other things. Flipping a coin and sampling students entering your class is an SRS from the population of students taking your course. It is not an SRS from the student body since inclusion in the sample is associated with taking your statistics course. Maybe its mostly business students, or maybe the other stats courses were offered early in the morning, hence students avoided it. See the difference?

Assuming I didn't overlook it, why is this not discussed in Triola's textbook?

Who knows, frankly. I can only hazards a guess, and either way it would not help your students understand the t-test.

• Thanks! The context is that this is a basic intro stats class for non-math/stats majors. So, the "requirements" are understood to be rules of thumb, like $n>30$. The idea is that the sampl.distr. should be approx. normal, and even though $n>30$ is often not good enough, in many cases it is, and so that's something the students can use as an initial barometer. However, I don't understand the requirement about the SRS. As you say, you can still use the t-test on a non-SRS. But what is something that these intro students can use as an initial barometer, similar to the $n>30$ requirement? Nov 30, 2022 at 15:42
• @BenW. Please see my edits Nov 30, 2022 at 18:42
• Thank you very much. I guess my main concern is that I have to stand up and tell my students that a simple random sample is required, but then we're going to turn around and do a bunch of t-tests for samples which are not SRS's. What am I supposed to tell them when they inevitably notice? And just speaking for myself, I don't like this bait-and-switch involved with hypothesis testing (it means, e.g., the probability of a type I error is not really alpha after all). Maybe what I really need is a reference to read about these issues, as they seem too varied to discuss on stackexchange. Nov 30, 2022 at 21:23
• @BenW. I suppose this is the statistician's lament; the real world is often tricker than our idealized scenarios. My suggestion is to either frame data as being a simple random sample from some population (the discussion of which population the sample is from can actually be an enlightening exercise) or preface the questions with an assumption (i.e. the data are a SRS from the population). Nov 30, 2022 at 22:21