system
Given the following post, respond as if you're commenting on Reddit:
human
Every time I look this up, I get conflicting answers - can anyone delineate the conditions under which it is valid to use a one-tailed t-test, as opposed to a two-tailed one?

Thanks in advance.
gpt
Hypothesis testing is fundamentally designed to control your type 1 error: the probability of mistakenly rejecting the null, when the null is actually correct. In laymen's terms, we might interpret this as "the probability of wrongly taking action if we're in a situation where we shouldn't take action". 

By design, hypothesis testing will fix this probability at a pre-specified rate, regardless of other types of mistakes (more on that in a second). In the most common significance level (95%), this means that there is a 5% chance we will mistakenly "take action" in cases where there isn't actually an effect happening. Note that this doesn't inherently tell you anything about how you perform in cases where there *is* something happening; that's covered by statistical power.

Now, a t-test is comparing two values (usually sample mean vs. null, or sample mean vs. another sample mean). Suppose we "take action" if either value is evidently greater than the other. This is the two-tailed test: there is a 5% chance that we mistakenly conclude one value is greater than the other. Since either outcome results in taking action, there is a 5% chance of committing a type 1 error.

Alternatively, suppose we only "take action" if value 1 is greater than value 2 (e.g. if some new strategy out-performs an old strategy). If there isn't any actual difference between value 1 and value 2, then it doesn't actually matter if we mistakenly conclude value 2 > value 1, since we won't "take action" in response (we'd simply keep the old strategy). This means that our outcome has only a 2.5% chance of a type 1 error where we mistakenly take action, so it doesn't make sense to report a 5% type 1 error rate. To address this, a one-tailed test is actually the equivalent of a 90% significance test, but only looking in one direction (looking for value 1 > value 2).

There are other valid ways to handle critical regions, and not all hypothesis tests are as symmetric / well-behaved as the simple t-test, but this is sufficient for a beginner's level. It also ignores any consideration of statistical power. Note that if you are performing a one-tailed test, this means that you would know which direction to look at *before collecting any data*, strictly from the context.