**
This Thread may be Removed Anytime!**

Twitter may remove this content at anytime! Save it as PDF for later use!

- Follow @ThreadReaderApp to mention us!
- From a Twitter thread mention us with a keyword "unroll"

`@threadreaderapp unroll`

Practice here first or read more on our help page!

WHY DID I SAY A P-VALUE IS A TEST OF SAMPLE SIZE?

THREAD 🧵

Suppose we want to test whether the mean of some random variable X is zero. To keep it simple, X1,...,Xn are i.i.d. N(mu, 1). Testing if mu=0.

1/🧵

THREAD 🧵

Suppose we want to test whether the mean of some random variable X is zero. To keep it simple, X1,...,Xn are i.i.d. N(mu, 1). Testing if mu=0.

1/🧵

Now suppose that IRL mu=0.001 (remember- IRL the null hypothesis never exactly holds!)

The z-test for testing mu=0 involves computing

Z=sqrt(n)*Xbar/sigma

and comparing to a N(0,1) distribution. And sigma=1 by my earlier assumption that X_1,...,X_n are i.i.d. N(mu,1).

2/

The z-test for testing mu=0 involves computing

Z=sqrt(n)*Xbar/sigma

and comparing to a N(0,1) distribution. And sigma=1 by my earlier assumption that X_1,...,X_n are i.i.d. N(mu,1).

2/

So Z=sqrt(n)*Xbar.

Suppose n=10^12 so sqrt(n)=1000000.

This means Z=1000000*Xbar.

And Xbar should be somewhere in the ballpark of 0.001 since it's the sample mean of a bunch of observations with mean mu=0.001.

3/

Suppose n=10^12 so sqrt(n)=1000000.

This means Z=1000000*Xbar.

And Xbar should be somewhere in the ballpark of 0.001 since it's the sample mean of a bunch of observations with mean mu=0.001.

3/

Last week, a paper came out that received a lot of very harsh criticism from the scientific community. First things first: I 100% agree with a lot of that criticism.

Criticizing a paper (or agreeing with others' criticisms of a paper) is okay. That's how science works.

1/

Criticizing a paper (or agreeing with others' criticisms of a paper) is okay. That's how science works.

1/

HOWEVER, after seeing the paper, I shot off a careless tweet. It was meant to be lighthearted, but it missed the mark!!!! It came across as a personal attack on the authors.

It was a mistake to have posted it, and I have since deleted it.

2/

It was a mistake to have posted it, and I have since deleted it.

2/

After I posted it, a lot of people came to my defense and said that my tweet was fine, in light of the issues with the paper in question. I appreciate the support.

But the fact remains: while scientific criticism is fine, an attack on the authors is not. I was in the wrong.

3/

But the fact remains: while scientific criticism is fine, an attack on the authors is not. I was in the wrong.

3/

Hi scientists, could you please help me understand why this Harvard site says that the FPR of PCR can be as high as 5%?

Is this just due to the risk of sample/lab contamination (hopefully << 5%), or do they consider it a FP if someone who recovered has trace amounts of virus? 1/

Is this just due to the risk of sample/lab contamination (hopefully << 5%), or do they consider it a FP if someone who recovered has trace amounts of virus? 1/

By contrast this website from MIT is in line with what I thought to be true- virtually no FP from PCR

2/

2/

Also I’m a statistician with an ok understanding of biology so please no lectures on specificity versus sensitivity or explaining what PCR is 🙏 🤣

3/3

3/3

today my husband said “in a normal year we’d be in air conditioned offices all day and we wouldn’t even notice the horrible air quality”

and that’s the moment I discovered that my husband thinks my office for the past literally 10 years has air conditioning

and that’s the moment I discovered that my husband thinks my office for the past literally 10 years has air conditioning

even though it doesn’t have A/C, i do miss it so— for one thing, my office has a door that I can close.

also, who wouldn’t love an office in a building that is ambiguously inspired by either a monastery or a prison?

also, who wouldn’t love an office in a building that is ambiguously inspired by either a monastery or a prison?

my other office has a window that can only be opened with a screwdriver, so yeah this is my nice office

The Bias-Variance Trade-Off & "DOUBLE DESCENT" 🧵

Remember the bias-variance trade-off? It says that models perform well for an "intermediate level of flexibility". You've seen the picture of the U-shape test error curve.

We try to hit the "sweet spot" of flexibility.

1/🧵

Remember the bias-variance trade-off? It says that models perform well for an "intermediate level of flexibility". You've seen the picture of the U-shape test error curve.

We try to hit the "sweet spot" of flexibility.

1/🧵

This U-shape comes from the fact that

Exp. Pred. Error = Irreducible Error + Bias^2 + Var

As flexibility increases, (squared) bias decreases & variance increases. The "sweet spot" requires trading off bias and variance -- i.e. a model with intermediate level of flexibility.

2/

Exp. Pred. Error = Irreducible Error + Bias^2 + Var

As flexibility increases, (squared) bias decreases & variance increases. The "sweet spot" requires trading off bias and variance -- i.e. a model with intermediate level of flexibility.

2/