Discussion 6: Statistical significance#
STATS 60 / STATS 160 / PSYCH 10
Today’s section
Recap of lecture material.
Week 6 practice quiz 1.
Spotting AI images.
Recap#
Hypotheses and p-values#
A p-value is the probability of finding a result at least as extreme/surprising, if outcomes happened by random chance alone.
The null hypothesis corresponds to “just chance” or “no effect.”
The alternative hypothesis corresponds to “better than chance” or “an effect.”
Small p-value → evidence against the null hypothesis.
“Small” means less than 0.05.
p-value visualization#

The p-value is represented by the red area in the histogram.
Computing p-values#
To compute a p-value, we need a model for what the results would have looked like if there was no effect.
Three questions:
If the null was true, what would be the “probability of success”?
What should be the “number of trials” (also called the sample size)?
What value will you compare the simulated data to?
Week 6 practice quiz#
Background#
Suppose that the league average for a soccer player scoring a penalty is 78%. A new player just scored 18 out of their last 20 penalty kicks.
You will investigate whether the number of goals scored by this new player is significantly different from the league average.

Question 1#
What are the null and alternative hypotheses? Describe them both in English and in mathematical symbols.
Answer
The null hypothesis is that the new player is just as good at scoring penalties as the league average. The alternative hypothesis is that the new player is better at scoring penalties.
In symbols, let \(\pi\) be the probability of the new player scoring on a penalty. The null hypothesis is \(H_0 : \pi = 0.78\) and the alternative hypothesis is \(H_A : \pi > 0.78\).
Question 2#
Describe how you would do a simulation to compute a p-value.
If the null was true, what would be the “probability of success”?
What would be the “number of trials”?
What value would you compare the simulated data to?
Answer
A “success” corresponds to the goal being scored. If the new player was just as good as the league average then they would score with probability 0.78. Therefore, the “probability of success” is 0.78.
The number of trails is 20 (the number of penalties taken).
The value to compare to is 18 (the number of goals scored in the sample).
Question 3#
The p-value for the observed results (18 out of 20 goals) is 0.15. What do you conclude about the null hypothesis?
Answer
Since the p-value is greater than 0.05, we do not have evidence against the null hypothesis that the player is just as good as the league average.
Spotting AI images#
Spotting AI images#
For each of the following images (1 through 7) write down which face (left or right) you think is real and which face you think is AI generated.
You will then see if your results are statistically significant.
We will look at the first image together.
The images are taken from whichfaceisreal.com.
Which face is real? - Practice#

Which face is real? - Solution#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Results#
Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

Which face is real?#

p-value computation#
Use the One Proportion applet to compute a p-value for your results.
Keep in mind the following:
Probability of success.
Number of trails.
What value to compare the data to.
State your conclusion in terms of a null hypothesis.