NelworksNelworks

ML & AI / Season 2 / EP04

Post-Selection Inference and Multiple Comparisons Problem

Shez

WE CURED IT!

Kurumi

We cured what? The common cold? Death? Or just your boredom?

Shez

Look! We screened 50,000 chemical compounds against the virus.

Shez

I found the 'Golden Three.'

Shez

Compound X-99. p-value: 0.001!

Kurumi

p = 0.001. That's very significant.

Shez

I know! The chance of this happening by luck is 1 in 1,000! It's virtually impossible that this is a fluke!

Kurumi

Shez. You tested 50,000 compounds.

Shez

Yeah! High-Throughput Screening! Big Data!

Kurumi

If you roll a 1,000-sided die... 50,000 times... how many times will you roll a '1'?

Shez

Uh... 50 times?

Kurumi

Exactly. You rolled the dice 50,000 times. You got 50 'miracles' purely by chance.

Kurumi

And you picked the top 3 and showed them to me.

Shez

But I filtered them! I threw away the failures!

Kurumi

That is exactly the crime.

Kurumi

Imagine a cowboy shooting at a barn. He has no aim. He just sprays bullets.

Kurumi

Then, *after* seeing where the bullets hit, he paints a target around them.

Shez

'Look! I'm a sniper!'

Kurumi

You aren't a sniper. You're a fraud. You conditioned the target on the result.

Kurumi

You cannot calculate a p-value on the winners if you ignore the losers.

Kurumi

You are assuming the hypothesis was 'Is X-99 effective?' *before* you started.

Kurumi

But your hypothesis was actually 'Is *Any* of these 50,000 effective?'

Shez

Well... yes. I wanted to find the best one.

Kurumi

If you use a 0.05 threshold... the probability of finding a fake 'cure' in this room is **100%**.

Shez

So... my p-value isn't 0.001?

Kurumi

Your p-value is garbage. It's **Post-Selection Inference**.

Kurumi

You used the data to *generate* the hypothesis, then used the *same data* to *prove* it. That is **Double Dipping**.

Shez

But look at the effect size! It killed 90% of the virus! The average compound only killed 10%.

Shez

Even if it's lucky, it's also strong!

Kurumi

Enter the **Winner's Curse**.

Kurumi

Imagine everyone has a 'True Skill' (Average Jump Height) + 'Luck' (Wind, Shoes, Breakfast).

Kurumi

The score you see is actually your real Skill plus Luck (Noise). Like: Score = Skill + Noise.

Kurumi

To be the absolute #1 winner out of 50,000, you need two things: High Skill... AND Massive Luck.

Kurumi

The winner is almost always the person who had the *most positive noise*.

Kurumi

Now, make him jump again.

Shez

Okay.

Shez

What happened? Did he get tired?

Kurumi

No. His luck ran out. The noise went back to zero.

Kurumi

His score **Regressed to the Mean**.

Kurumi

This compound probably works a *little* bit. But your measurement says '90% efficacy.'

Kurumi

That 90% is likely 40% Reality + 50% Luck.

Shez

So if I send this to clinical trials...

Kurumi

It will fail. Just like 90% of drugs do in Phase 2. Because you selected the outlier, not the truth.

Shez

So I can't screen? I can't look for the best?

Shez

Do I have to test one drug at a time for the rest of my life?

Kurumi

You can screen. But you have to pay the tax.

Kurumi

Option 1: **The Bonferroni Correction**.

Shez

Sounds like a pasta.

Kurumi

You divide your p-value threshold by the number of tests.

Kurumi

0.05 / 50,000 = 0.000001.

Shez

X-99's p-value is 0.001. The required threshold is 0.000001.

Shez

It fails. It's not significant anymore.

Kurumi

Correct. Bonferroni is brutal. It assumes the worst.

Shez

That's too hard! I'll never find anything! Is there an easier way?

Kurumi

Option 2: **Data Splitting**. The Engineering Way.

Kurumi

You screened 50,000 compounds? Great.

Kurumi

Use the first 50% of the data (samples) to **Select** the winners.

Shez

Okay, I picked X-99, Y-20, and Z-01 based on Set A.

Kurumi

Now, throw away all the data from Set A. Forget it exists.

Kurumi

Test those 3 winners on **Set B**.

Kurumi

In Set B, you are only testing 3 hypotheses. Not 50,000.

Kurumi

So you don't need a crazy correction. 0.05 / 3 is easy to beat.

Shez

And because Set B is fresh... the 'Luck' from Set A doesn't carry over!

Kurumi

Exactly. If X-99 was just lucky noise in Set A, it will likely be average in Set B. The lie will reveal itself.

Shez

Splitting the dataset!

Shez

Training Set (Screening): Identifying candidates...

Shez

Validation Set (Confirmation): Testing the candidates...

Shez

X-99 was a fraud! It regressed to the mean!

Shez

But Z-01... Z-01 is the real deal!

Kurumi

X-99 was the Texas Sharpshooter's target.

Kurumi

Z-01 is a verified hit.

Shez

We actually found one. A real one.

Kurumi

You found one because you stopped lying to yourself about the 49,999 failures.

Kurumi

Now run a replication study on a different day, with different reagents, by a different person.

Shez

What? Why?!

Kurumi

Because **Batch Effects** are a whole other nightmare, but perhaps we will leave that for another time.