## All posts tagged **hypothesis test**

# A T-shirt describing hypothesis testing

*Posted by John Quintanilla on January 7, 2015*

https://meangreenmath.com/2015/01/07/a-t-shirt-describing-hypothesis-testing/

# Mathematical Christmas gifts

Now that Christmas is over, I can safely share the Christmas gifts that I gave to my family this year thanks to Nausicaa Distribution (https://www.etsy.com/shop/NausicaaDistribution):

Euler’s equation pencil pouch:

Box-and-whisker snowflakes to hang on our Christmas tree:

And, for me, a wonderfully and subtly punny “Confidence and Power” T-shirt.

Thanks to FiveThirtyEight (see http://fivethirtyeight.com/features/the-fivethirtyeight-2014-holiday-gift-guide/) for pointing me in this direction.

For the sake of completeness, here are the math-oriented gifts that I received for Christmas:

*Posted by John Quintanilla on December 26, 2014*

https://meangreenmath.com/2014/12/26/mathematical-christmas-gifts/

# Null hypothesis

Source: http://xkcd.com/892/

*Posted by John Quintanilla on March 11, 2014*

https://meangreenmath.com/2014/03/11/null-hypothesis/

# Rejection regions

Sage words of wisdom that I gave one day in my statistics class:

If the alternative hypothesis has the form , then the rejection region lies to the right of . On the other hand, if the alternative hypothesis has the form , then the rejection region lies to the left of .

On the other hand, if the alternative hypothesis has the form , then the rejection region has two parts: one part to the left of , and another part to the right. So it’s kind of like my single days. Back then, my rejection region had two parts: Friday night and Saturday night.

*Posted by John Quintanilla on January 21, 2014*

https://meangreenmath.com/2014/01/21/rejection-regions/

# Welch’s formula

When conducting an hypothesis test or computing a confidence interval for the difference of two means, where at least one mean does not arise from a small sample, the Student *t* distribution must be employed. In particular, the number of degrees of freedom for the Student *t* distribution must be computed. Many textbooks suggest using Welch’s formula:

rounded down to the nearest integer. In this formula, is the standard error associated with the first average , where (if known) is the population standard deviation for and is the number of samples that are averaged to find . In practice, is not known, and so the bootstrap estimate is employed.

The terms and are similarly defined for the average .

In Welch’s formula, the term in the numerator is equal to . This is the square of the standard error associated with the difference , since

.

This leads to the “Pythagorean” relationship

,

which (in my experience) is a reasonable aid to help students remember the formula for .

Naturally, a big problem that students encounter when using Welch’s formula is that the formula is really, really complicated, and it’s easy to make a mistake when entering information into their calculators. (Indeed, it might be that the pre-programmed calculator function simply gives the wrong answer.) Also, since the formula is complicated, students don’t have a lot of psychological reassurance that, when they come out the other end, their answer is actually correct. So, when teaching this topic, I tell my students the following rule of thumb so that they can at least check if their final answer is plausible:

.

To my surprise, I have never seen this formula in a statistics textbook, even though it’s quite simple to state and not too difficult to prove using techniques from first-semester calculus.

Let’s rewrite Welch’s formula as

For the sake of simplicity, let and , so that

Now let . All of these terms are nonnegative (and, in practice, they’re all positive), so that . Also, the numerator is no larger than the denominator, so that . Finally, we notice that

.

Using these observations, Welch’s formula reduces to the function

,

and the central problem is to find the maximum and minimum values of on the interval . Since is differentiable on , the absolute extrema can be found by checking the endpoints and the critical point(s).

First, the endpoints. If , then . On the other hand, if , then .

Next, the critical point(s). These are found by solving the equation :

Plugging back into the original equation, we find the local extremum

Based on the three local extrema that we’ve found, it’s clear that the absolute minimum of on is the smaller of and , while the absolute maximum is equal to .

In conclusion, I suggest offering the following guidelines to students to encourage their intuition about the plausibility of their answers:

- If is much smaller than (i.e., ), then will be close to .
- If is much larger than (i.e., ), then will be close to .
- Otherwise, could be as large as , but no larger.

*Posted by John Quintanilla on June 25, 2013*

https://meangreenmath.com/2013/06/25/welchs-formula/

# Statistical significance

When teaching my Applied Statistics class, I’ll often use the following xkcd comic to reinforce the meaning of statistical significance.

The idea that’s being communicated is that, when performing an hypothesis test, the observed significance level is the probability that the null hypothesis is correct due to dumb luck as opposed to a real effect (the alternative hypothesis). So if the significance level is really about and the experiment is repeated about 20 times, it wouldn’t be surprising for one of those experiments to falsely reject the null hypothesis.

In practice, statisticians use the Bonferroni correction when performing multiple simultaneous tests to avoid the erroneous conclusion displayed in the comic.

Source: http://www.xkcd.com/882/

*Posted by John Quintanilla on June 24, 2013*

https://meangreenmath.com/2013/06/24/statistical-significance/