News for hackers. Stuff that matters.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by chimeracoder on Monday March 07, 2016 @01:09PM (#11240382)
For context, I have a degree in statistics, and I did research with Andrew Gelman (one of the statisticians quoted in the article).

Glad to see this is gaining traction! I've been saying this for years: the world would actually be in a better place if we just abandoned p-values altogether.

Hypothesis testing is taught in introductory statistics courses because the calculations involved are deceptively easy, whereas more sophisticated statistical techniques would be difficult without any background in linear algebra or calculus.

Unfortunately, this enables researchers in all sorts of fields to make incredibly spurious statistical analyses that look convincing, because "all the calculations are right", even though they're using completely the wrong tool.

Andrew Gelman, quoted in the article, feels very strongly that F-tests are always unnecessary[0]. I'd go as far as to extend that logic to the Student's t-test and any other related test as well.

You can get into all sorts of confusing "paradoxes" with p-values. One of my favorites:

Alice wants to figure out the average height of population. Her null hypothesis is 65 inches. She conducts a simple random sample, performs a t-test, and determines that the sample mean is 70 inches, with a p-value of .01.

In an alternate universe, Bob does the same thing, with the same null hypothesis (65 inches). He determines that the sample mean is 90 inches, with a p-value of .000001.

Some questions:

A) Does Bob's experiment provide stronger evidence for rejecting the null hypothesis than Alice's does?

B) In Bob's universe, is the true population mean higher than it is in Alice's universe?

By pure hypothesis testing alone, the correct answer to both questions is "no", even though the intuitive answer to both questions is "yes"[1].

[0] http://andrewgelman.com/2009/05/18/noooooooooooooo/

[1] Part of the problem is that we do expect that, in Bob's universe, the true population mean is highly likely to be higher, and this is supported by the data. Trouble is, the reason we expect that is not formally related to hypothesis testing and t-tests/p-values.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by eanzenberg on Monday March 07, 2016 @01:30PM (#11240540)
If you're doing a measurement, why have a null hypothesis? Alice should sample the population at random, take the height measurements, calculate the average, plot the distribution, calculate the variance. If the distribution is not sufficiently smooth then continue to take measurements until it's smooth, or unchanging. Then Alice is done discovering all there is to know about the height distribution of the population she sampled. Same with Bob.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by chimeracoder on Monday March 07, 2016 @02:00PM (#11240748)
> Alice should sample the population at random, take the height measurements, calculate the average, plot the distribution, calculate the variance

A student-t test is basically a lossy encoding of that information you describe (the sample mean, the variance, and the sample size).

> If the distribution is not sufficiently smooth then continue to take measurements until it's smooth, or unchanging.

From a frequentist standpoint, this would be considered sloppy and bad methodology. You don't keep sampling until you get the results you want (or until the null hypothesis is invalidated).

That said, as I mention in a comment above, the fact that you can keep sampling until the null hypothesis is invalidated (and that it is mathematically always guaranteed to happen eventually) is a big problem with the concept of hypothesis testing in the first place.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by ryanmonroe on Monday March 07, 2016 @07:39PM (#11242838)
Creating an 100(1-a)% interval estimate of the population mean based on the sample's mean and variance is equivalent to examining the set of all values which produce a p-value below a%. Your view of the way Alice and Bob should be making inference about the true mean is actually exactly what hypothesis testing is. It's just that there is often a "status quo" belief about the parameter which has important theoretical implications. And academic papers are usually about that belief specifically, so it makes sense that they talk about it as a "hypothesis test". And that's the logical headline, the statement about the specific value. But standard deviations and distributions are often given, making it trivial to create the interval as a reader.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by bunderbunder on Monday March 07, 2016 @01:58PM (#11240734)
This paradox is a great example of why I'm uncomfortable with the idea of coming up with a p-value when you're comparing a sample mean to a point value in the first place.

If your null hypothesis amounts to little more than a scalar value that exists in a vacuum, you haven't really got a null hypothesis. If your null hypothesis is that your results will match what was seen in some other data set collected by some other person who may or may not have been using the same protocol as you, your null hypothesis describes a parallel universe and there's no way to draw an apples-to-apples comparison to it and your alternative hypothesis, which concerns data that did not come from that parallel universe.

So I guess my answer to all questions would be, "Mu."

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by statsaresimple on Monday March 07, 2016 @03:36PM (#11241421)
I can't understand what is the problem with p-values. You should never talk about the results, the essential point is that the method provides valid conclusions 95% and invalid conclusions 5% of the time. If your conclusion is wrong (you are in the 5% part) that is not a paradox. Also you should not try to prove things since your conclusion can be wrong, you should be glad to have a procedure that gives you useful information but is not infallible. By being humble you solve the problem.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @01:40PM (#11240602)
For giggles and grins, my aunt and uncle are an actual example of one of the classic frequentist vs bayesian examples where frequentist statistics says that something utterly irrelevant should matter.

Scenario 1 (true). Bill and Lorena had 7 children. 6 were boys, 1 was a girl. Are they biased towards having one gender? A 2-sided p-value says that there are 16 possibilities of this strength or more, each of which has probability 1/2^7, for a p-value of 2^4/2^7 = 1/2^3 = 0.125. We therefore fail to reject the null hypothesis at a p-value of 0.05.

Scenario 2 (also true): Bill and Lorena decided to have children until they had a boy and a girl. They had 6 boys then a girl. Are they biased towards having one gender? An event this unlikely could only happen if they had 6 of the same gender in a row, which is 2 possibilities of probability 1/2^6, for a probability of 2/2^5 = 1/2^5 = 0.03125. We therefore reject the null hypothesis at a p-value of 0.05.

Now the Bayesian gotcha. According to Bayes' theorem, the intent of Bill and Lorena can have absolutely NO impact on ANY calculation of posterior probabilities from prior expectations. There is no logical way in which this fact should matter at all. And yet it did!

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @02:31PM (#11240964)
Is this actually true for the Bayesian model? Throw in a parameter for whether or not Bill and Lorena were trying to have children until they had a boy and a girl. Now your answer will depend quite heavily on your prior!
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @02:53PM (#11241143)
This is entirely true.

The posterior odds are computed ENTIRELY from the odds of the observed events under the prior beliefs. There is NO WAY in which might-have-beens and didn't-happens enter in. Therefore the posterior probabilities cannot depend on the knowledge of what they would have done if something different had happened.

Of course frequentist statistics are heavily affected by what would have happened if something different had happened.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @03:22PM (#11241327)
No, even as a Bayesian I could use either of two models to understand my data:

In world one, I use bayesian update on the model P(# boys | Bias) = Mutltinomial(n = 7, p = Bias)

In world two, I use bayesian update on the model P(# children | Bias) = Geometric(p = Bias)

Might-have-beens and didn't happens do play in, in my choice of model. I should choose the one that I believe, and if I'm not certain, I should use an even more complicated model that incorporates my beliefs about what models might be appropriate.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @04:14PM (#11241738)
Not if you follow Bayes' theorem. If you start with a prior distribution of beliefs about the likelihood of various ratios of boy vs girl births, the posterior distribution only depends on the observed outcomes. And the posterior distribution is exactly given by Bayes' theorem.

One possible source of confusion for you is that Bayesian ideas have been a source of inspiration for a lot of ad hoc techniques (eg naive Bayes) which do NOT follow Bayesian rules of inference. The reason is that exact inference in Bayes nets is NP-hard. So you're used to hearing "Bayesian" applied to things that have nothing to do with Bayes' formula.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @05:15PM (#11242180)
Our goal is to calculate P(pb > 0.5 | "Six girls and one boy"), where pb is the probability of having a boy. (Ignoring that we have already assumed p is fixed), by applying Bayes' Theorem, we have:

P(pb > 0.5 | "Six girls and one boy") = (P("Six girls and one boy" | pb > 0.5) * P(pb > 0.5)) / P("Six girls and one boy")

Applying Bayes theorem thus requires us to calculate P("Six girls and one boy" | pb > 0.5). How do you suggest that we do this? Why is your answer the unique correct solution?

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @05:36PM (#11242314)
Well first you have to start with a prior distribution of beliefs, which that is not. And to reduce confusion I'll switch back to the actual genders (6 boys then a girl).

Suppose our prior distribution of beliefs is 0.5 that the probability is exactly 1/2, versus 0.5 that the probability of a boy is some value P which is equally likely to be any value from 0 to 1.

In the first case, the probability of 6 boys and 1 girl is 0.5^7 = 1/2^7. In the second case the probability of 6 boys and 1 girl is P^6(1-P) = P^6 - P^7. The integral from 0 to 1 of P^6 - P^7 is 1/6-1/7 = 1/42. Each case also has a priori odds of 1/2 of holding true.

After observing 6 boys and 1 girl, the first case now has probability (0.5/2^7)/(0.5/2^7 + 0.5/42) = 1/(1 + 64/21) = 21/129 = 0.162790697674419. The second case now has probability 1 - this, which is 0.837209302325581. Furthermore if the second case is true, P is no longer uniformly distributed. In fact its density is now proportional to P^6-P^7.

So the posterior distribution is now going to be:

With probability 21/129, exactly 0.5. And otherwise any value P from 0 to 1 with a probability density of 108/129*(P^6-P^7)/42.

Given this prior and this set of observations, any other answer is wrong. Given a different prior you would get a different posterior, but as long as the prior gives a constant probability of male/female, the only fact that matters is how many boys and girls there are.

The order of births can only start to matter if you start with a prior that gives different probabilities of different genders based on prior events. Even then it is hard to come up with a realistic scenario in which the plans of the parents would make an order of magnitude difference in the posterior distribution.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @05:56PM (#11242417)
But if they are having children until they have one of each, the probability of the different observations does depend on the prior events!
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @06:33PM (#11242572)
The absolute probability of the observation is irrelevant. Only the RELATIVE probabilities of said observation under the different possible theories which are part of the prior.

If the set of prior theories does not include anything that depends on birth order, then birth order and the experimental design are irrelevant to the posterior conclusions.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @07:36PM (#11242821)
Right, but this is exactly my point: the correct answer depends on the set of prior theories, which is exactly what the frequentist scenarios you consider are varying.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @08:39PM (#11243049)
If you are arguing THAT point, then you shouldn't have disagreed with me anywhere!

We have 3 types of facts.

1. What is the set of prior theories? Probability theory says this should matter. Bayesians are explicit about its involvement. Frequentists ignore it.

2. Observed data. Probability theory says that this should matter. Everyone takes this into account.

3. Experimental design for what would have happened had something different than the observed actually happened. This matters a lot to frequentist approaches and does not matter at all to Bayes' theorem. Bayesian approaches generally do not care about it at all.

The difference between scenario 1 and scenario 2 is a fact of type 3, the conditions under which Bill and Lorena would have stopped having children. Unless you believe that Bill and Lorena's desire for one gender has a material impact on the probability of boys vs girls, this fact is irrelevant to any calculation of posterior probabilities. And is irrelevant in classical Bayesian approaches.

Yet, despite being irrelevant, it matters a lot for frequentist approaches.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @09:59PM (#11243297)
1 and 3 are really the same thing. If the complaint is that the frequentist test can't tell you anything if the assumed distribution wasn't the right one (which is what's happening if you would have done something different), consider the bayesian case. There one might argue you at least still have the probability of each hypothesis given the data. But that forgets that it is only the probability of each hypothesis given the data, given that those were the only possible hypotheses. And if you admit the possibility of their being other possible hypotheses, then these probabilities don't really tell you anything either.

Anyway, not sure if we're on the same page, but thanks for the discussion.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @10:37PM (#11243414)
We are clearly not on the same page. Because I think that 1 and 3 are rather different things, and you don't.

In particular 1 consists of exact statements about the likelihood of 7 births in a row being mmmmmmf.

By contrast 3 consists of statements about what Bill and Lorena's childbearing plans would have been if something different had happened.

Those are very different types of statement. There is no connection between statements of type 3 and statements of type 1 unless Bill and Lorena's state of mind makes a significant difference to the odds of the next child being a boy.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @11:29PM (#11243541)
Okay, my last try.

For Bayes' theorem, we need a theory of how the data is produced given the parameter of interest. Bill and Lorena's plans certainly influence what data I observe: in scenario two, I can never observe the data BBBBGGG, but in scenario one, I can. My point is that your first category is not "exact statements about the likelihood of 7 births in a row being mmmmmmmf", it is "exact statements about the likelihood of observing mmmmmmf", which is, in fact, quite different, if you admit the possibility of Bill and Lorena having particular childbearing plans.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Tuesday March 08, 2016 @01:21PM (#11247247)
If you include into the priors information about the likelihood of the next child being born, you will indeed get different absolute probabilities. But you will not get different relative probabilities unless your available priors create a correlation between birth order and the likelihood of different genders for the next child if it comes. And therefore the probability of having the next birth cancels out of Bayes' formula and you wind up with the exact same conclusions from the observed data.

You certainly DON'T wind up with anything like the factor of 8 difference that frequentist techniques will see!

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by lfowles on Monday March 07, 2016 @02:46PM (#11241085)
Is this oddity just because scenario 1 fails to account for order?
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by btilly on Monday March 07, 2016 @02:49PM (#11241118)
Exactly. There are more ways to get this unusual outcome in scenario 1 than scenario 2.
Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by thinkmoore on Monday March 07, 2016 @02:24PM (#11240909)
If Alice just wants to know the average height of the population, why is she doing a hypothesis test that the height isn't 65 inches?

Since her hypothesis test is designed to help answer the question of whether or not the mean population height is 65 inches, why should we expect it to tell us anything about the mean population height other than whether or not it being 65 is consistent with the data observed?

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by kgwgk on Monday March 07, 2016 @04:42PM (#11241947)
Where is the "paradox"? I assume that you mean that by pure hypothesis testing both Alice and Bob reject the null hypothesis at the alpha=0.05 level, for example. The fact that the p-value is irrelevant is by design: you perform the test and either you reject the null hypothesis or you don't. But in fact most people won't do "pure" hypothesis testing and will conclude (somewhat incorrectly) that the evidence against the null hypothesis is indeed stronger in Bob's experiment.

Edit: and why would be the answer to the second question "no"? The hypothesis testing procedure doesn't provide any point estimate at all so the question doesn't really mean anything in that setting.

Re:Statisticians Find They Can Agree: It’s Time to Stop Misu... by tryitnow on Monday March 07, 2016 @02:00PM (#11240750)
Thanks! This is one of the best explanations of the problem with using p-values.

Furthermore, I can recall many times when my stats professors would make it very clear what the "right" answer was, despite it being counter-intuitive but without explaining