4.2 Finding Patterns in Random Noise: Difference between revisions
More actions
Winstonyin (talk | contribs) |
No edit summary |
||
| Line 104: | Line 104: | ||
== Lesson Content == | == Lesson Content == | ||
=== | === Discussion Questions === | ||
# | # (4 min) Why might humans be likely to see patterns in random noise? | ||
## | #: {{Answer|'''Example Answers:''' Natural psychological discomfort with ambiguity and uncertainty, link bank to superstitions in previous sections (seeing causation when there is only correlation). Discuss Patternicity article: when the costs of missing a real signal are higher than the costs of misperceiving a non-existent signal in noise, we are likely to perceive a signal. The example of seeing the “pattern” of a predator from the “noise” of a rustling patch of grass is a great example.}} | ||
## | # (4 min) Name some ways in which the Look Elsewhere Effect may impact scientific studies? | ||
#: {{Answer|If a seemingly impressive “signal” appeared in one part of a large data set, a scientist might get very excited and publish that result, but they would’ve been equally impressed had the “signal” appeared ''elsewhere'' in the data set. The likelihood that some spurious signal appears anywhere in a large data set is quite high. The scientist has in this case forgotten that they should’ve looked elsewhere in the data set and noted that the “signal” in the totality of the data set is actually very weak.}} | |||
# (4 min) How do scientists try to stop themselves from seeing significant signals/patterns when only noise is present? (hint: think p-values) | |||
#: {{Answer|With tests of statistical significance! With a p-value cutoff of .05, you have a 5% chance of detecting a signal if there is truly only noise. You can adjust this threshold (typically .05) to suit your needs.}} | |||
# (4 min) What do you think of the results of the study in “Have smartphones destroyed a generation?” Do we trust it? Why or why not? How could we amend the analysis to trust it more? | |||
#: {{Answer|It fell prey to the look elsewhere effect, since there were simply so many explanatory variables that is highly likely that one will be correlated purely by chance. We could correct this by having a lower p-value threshold, like <math>.05/\text{(number of variables considered)}</math>}} | |||
# (4 min) What’s the joke in [https://xkcd.com/882/? this] comic? | |||
#: {{Answer|If each test has a 5% chance of saying there's a signal when there’s not, if you run enough tests (on enough colors of jelly beans), you’re gonna get one to say there's a signal. This is the look elsewhere effect!}} | |||
=== | === Clicker Question === | ||
== | A friend tells you that, when conducting coin flips, there were ten heads in a row. This is, of course, a surprising result. In what situation would it be most surprising? | ||
<ol style="list-style-type:lower-alpha"> {{Answer|a|small=right}} | |||
<li>She is the only person flipping a coin, and she flipped it only ten times.</li> | |||
<li>There are many people flipping coins, and everyone flips ten times.</li> | |||
<li>There are many people flipping coins, and each person conducts 100 flips.</li> | |||
<li>She is the only person flipping a coin, and she conducts 100 flips.</li> | |||
</ol> | |||
=== | === Fool the Professor === | ||
This activity illustrates the fact that pure randomness can and will generate apparent patterns. Each class is split into two halves, with one half generating a random string of coin flips and the other half coming up with a string of coin flips that should “fool the professor” into thinking that that is the random string. The upshot is that the true random string tends to contain more long consecutive heads (or tails) than the fake random string. | |||
{{Caution|If the activity is done in multiple small sections, aggregate the two strings (one true random and one fake random) across all classes. The final two long strings are to be presented to the professor at the plenary session. To make sure the strings continue from those of the previous class, read the 10 trailing coin flips to the students before they generate the new strings.}} | |||
{{ | {{Caution|Consider the list of coin flips listed from top to bottom. If there are two concurrent sections, then one section should add their coin flips to the bottom of the list, while the other section adds theirs to the top of the list (in the reverse order). See image below. | ||
{{Caution| | [[File:Fool the Professor List Directions.png|center]]}} | ||
== Collect Questions for Plenary == | == Collect Questions for Plenary == | ||
Revision as of 12:56, 11 November 2021
Learning Goals
[Link to PlayPosit]
After this lesson, students should
- Understand that people tend to see any regularity as a pattern (i.e., see more signal than there is), even when “patterns” occur by chance (i.e. are pure noise).
People underestimate the frequency of apparent patterns produced by randomness, leading to overperception of spurious signal much more frequently than people account for. Events that are just coincidental are much more likely than most people expect. - Resist the opposing temptations of both the Gambler’s Fallacy (the expectation that a run will soon break and quickly balance out) and the Hot-Hand Fallacy (the expectation that a run will continue).
- Recognize the Look Elsewhere Effect: If there is a low probability of obtaining a false positive in any given instance, the more times you try (the more questions you ask, measures you take, or studies you run without statistical correction), the more you increase the probability of getting a false positive. This occurs when one:
- Asks too many questions of the same data set, reporting only statistically significant results.
- Asks the same question of multiple data sets, reporting only statistically significant results.
- Runs a test or similar tests too many times, reporting only statistically significant results.
- This also occurs in everyday life, e.g. when one looks at a whole lot of phenomena and only takes note of the most surprising-looking patterns, not properly taking into account the larger number of unsurprising patterns/lack of pattern.
Definitions
- Look Elsewhere Effect
- If there is a low probability of obtaining a false positive in any given instance, the more times you try (the more questions you ask, measures you take, or studies you run without statistical correction), the more you increase the probability of getting some false positive.
The effect occurs when one:Since humans are so good at identifying noise that looks like signals, it is easy to find and fall victim to this even if it doesn’t seem like we’re asking too many questions. The look elsewhere effect can be avoided by clearly stating the questions you’re asking before seeing the data. - Asks too many questions of the same data set, reporting only statistically significant results.
- Asks the same question of multiple data sets, reporting only statistically significant results.
- Runs a test or similar tests too many times, reporting only statistically significant results.
- This also occurs in everyday life, e.g. when one looks at a whole lot of phenomena and only takes note of the most surprising-looking patterns, not properly taking into account the larger number of unsurprising patterns/lack of pattern.
- If there is a low probability of obtaining a false positive in any given instance, the more times you try (the more questions you ask, measures you take, or studies you run without statistical correction), the more you increase the probability of getting some false positive.
- p-value
- The statistic used most often as a measure of statistical significance. The probability of getting a result as extreme or more if in fact the hypothesis is false, simply through random noise. The typical cut-off for a statistically significant p-value is p<.05.
- p-hacking
- A subset of the Look Elsewhere Effect that occurs when people conduct multiple statistical tests and only report those with p-values over .05 (the traditional threshold for publication and statistical significance, which indicates a tolerance of 5% false positives).
Common techniques that constitute p-hacking include:A p-value cutoff of .05 thus indicates that, on average, 1 in 20 results will be false positives. So one should expect, on average, one false positive for every 20 independent analyses of pure noise. P-hacking is statistically problematic but more often a result of misunderstanding than deliberate fraudulence. - Running different statistical analyses on the same dataset and only reporting the statistically significant ones.
- Analyzing multiple DVs and only reporting the statistically significant ones.
- Gradually increasing the sample size until the p-value falls below .05.
- A subset of the Look Elsewhere Effect that occurs when people conduct multiple statistical tests and only report those with p-values over .05 (the traditional threshold for publication and statistical significance, which indicates a tolerance of 5% false positives).
- Gambler's Fallacy
- Expecting that streaks (e.g. Tails Tails Tails Tails) will be broken, such that future results will quickly “average out” earlier ones, even when all trials are independent.
- Hot-hand Fallacy
- Expecting that streaks (e.g. winning hands in Poker) will continue, even when all trials are independent.
These two fallacies lead in opposite directions, but are both a result of the misconception that small samples (or short runs) will resemble large samples (or long runs), forgetting about statistical uncertainty. The Gambler’s Fallacy arises because people assume a small sample will look like a large sample, such that a run of e.g. Tails will quickly be balanced out by Heads. The Hot Hand Fallacy arises when a run (e.g. of Tails) makes people think the sequence isn’t truly random, but an effect of skill or luck that will continue. Both fallacies arise because long runs are commoner in random sequences than people expect.
- Expecting that streaks (e.g. winning hands in Poker) will continue, even when all trials are independent.
- Statistical Significant
- How unlikely a given set of results would be if the null hypothesis were true (i.e. if the hypothesized effect did not actually exist).
Examples
- Mr. Goxx: A hamster that actively manages a cryptocurrency portfolio by running in his “intention wheel” to determine what he’s buying/selling and then goes through either a “BUY” or “SELL” decision-tunnel to decide what he’s doing with it. As of october 2021, his portfolio was up nearly 30% from june when he started trading crypto. His decisions are streamed live on Twitch.
- Cold reading in a crowd: A medium shouts out to a crowd somewhat common names, such as William and Butler, and common ailments such as, “heart problem” or “passed in their sleep”. It is very likely that a couple people in the crowd can match a majority of these features to someone in their life, making the claims seem impressively accurate (seemingly small p-value), but this ignores all the other members of the audience who could not match any of the claims. This is an illustration of p-hacking.
- p-hacking through incrementing sample size: “We conducted the study on 1000 participants, and our p-value is just slightly above 0.05. Let’s recruit another 20 participants to see if our p-value can dip under 0.05.” If they keep increasing their sample size by 20 each time, the p-value will fluctuate just from chance alone, possibly dipping below 0.05 even if there isn’t a real signal. This is equivalent to only selecting a subsample of the data that would confirm a hypothesis, omitting that an even larger sample would have rejected the same hypothesis.
Common Misconceptions
- Look Elsewhere Effect means that more data leads to more misinterpretations, or "too much data is bad".
- In fact, more data reduces statistical uncertainty and thus strengthens inferences. What can lead to more misinterpretations through the Look Elsewhere Effect is when people ask too many statistical questions of the dataset without correcting for multiple comparisons.
- More separate analyses someone runs, the better their analysis will be.
- In fact, the more analyses someone runs, the more likely they are to hit upon a false positive, unless they correct for multiple comparisons (which can be done statistically).
- Wow, that was such a striking coincidence! It must have some hidden significance.
- Even very striking coincidences are bound to happen if you look across enough events. We forget how many events we have looked through, and remember only the coincidence. (See 10.1 Confirmation Bias.)
Context
This lesson continues 3.2 Signal and Noise by elaborating on ways in which random noise can emulate signals (produce apparent patterns) in many different contexts. We introduce the idea of p-values to quantify the statistical significance of patterns and describe various tempting statistical fallacies we tend to make as laypersons or scientists, such as gambler’s fallacy and p-hacking. We play a game in which students try to produce a random string of coin tosses by thought, which reveals that a truly random string in fact contains more apparent patterns than one intuitively expects. Two other activities also illustrate how spurious patterns are in fact expected to arise from random noise.
Before
- 3.2 Signal and Noise
- A signal is a particular pattern of the data that we are seeking, while noise is something that introduces uncertainty or error into the measurement of that data, in a way that sometimes produces spurious signals.
- p-values are one way to quantify how statistically significant a measured signal is compared to the noise. It is defined as the probability that the measured signal is produced entirely by random noise alone even when the underlying cause of a signal is absent.
After
- 8.2 Heuristics and Biases II
- Cognitive heuristics and biases such as confirmation bias may mislead us into seeing a pattern in random data where there is none.
- 9.2 Pathological Science
- p-hacking is one source of pathological science, where authors fail to disclose the measurements in which the supposed signal is not observed, thereby falsely inflating the statistical significance of the reported signal.
Recommended Outline
Before Class
- Prepare a seating chart.
- Review PlayPosit and discussion questions and ask faculty, Gabriel, or Emlen any questions you have.
- Familiarize yourself with the Google Doc [link …] for the Fool the Professor game.
- Get enough pennies for the whole class for the Fool the Professor game.
- Print handouts for Stock Prediction and Snowy Pictures activities.
- Prepare slides for Snowy Pictures activity.
- Familiarize yourself with the Jupyter notebook.
- (Optional) Prepare a presentation.
During Class
- (5 min) Come up with some fun way to assign the roles of spokesperson and notetaker (e.g. earliest birthday in the year, lives furthest from campus). Remind them of the responsibilities of these roles.
- (20 min) Discussion questions.
- (2 min) Clicker question.
- (15 min) Fool the Professor activity.
- (8 min) Stock predictions activity.
- (4 min) Snowy Pictures activity.
- (26 min) Use the remaining time to start work on the p-hacking notebook.
After Class
- One GSI should compile histograms for the Fool the Professor game.
- Separately for each of the two strings of coin tosses, tally the number of times a consecutive run of N heads or tails occurs. (This may be done with a script or the search-and-replace function in a text editor.)
- Mask which string is the true random one by labelling them A and B.
- Make the following two histograms for the tallies of consecutive runs, stacking the tallies for heads and tails.
Lesson Content
Discussion Questions
- (4 min) Why might humans be likely to see patterns in random noise?
Example Answers: Natural psychological discomfort with ambiguity and uncertainty, link bank to superstitions in previous sections (seeing causation when there is only correlation). Discuss Patternicity article: when the costs of missing a real signal are higher than the costs of misperceiving a non-existent signal in noise, we are likely to perceive a signal. The example of seeing the “pattern” of a predator from the “noise” of a rustling patch of grass is a great example.
- (4 min) Name some ways in which the Look Elsewhere Effect may impact scientific studies?
If a seemingly impressive “signal” appeared in one part of a large data set, a scientist might get very excited and publish that result, but they would’ve been equally impressed had the “signal” appeared elsewhere in the data set. The likelihood that some spurious signal appears anywhere in a large data set is quite high. The scientist has in this case forgotten that they should’ve looked elsewhere in the data set and noted that the “signal” in the totality of the data set is actually very weak.
- (4 min) How do scientists try to stop themselves from seeing significant signals/patterns when only noise is present? (hint: think p-values)
With tests of statistical significance! With a p-value cutoff of .05, you have a 5% chance of detecting a signal if there is truly only noise. You can adjust this threshold (typically .05) to suit your needs.
- (4 min) What do you think of the results of the study in “Have smartphones destroyed a generation?” Do we trust it? Why or why not? How could we amend the analysis to trust it more?
It fell prey to the look elsewhere effect, since there were simply so many explanatory variables that is highly likely that one will be correlated purely by chance. We could correct this by having a lower p-value threshold, like [math]\displaystyle{ .05/\text{(number of variables considered)} }[/math]
- (4 min) What’s the joke in this comic?
If each test has a 5% chance of saying there's a signal when there’s not, if you run enough tests (on enough colors of jelly beans), you’re gonna get one to say there's a signal. This is the look elsewhere effect!
Clicker Question
A friend tells you that, when conducting coin flips, there were ten heads in a row. This is, of course, a surprising result. In what situation would it be most surprising?
- She is the only person flipping a coin, and she flipped it only ten times.
- There are many people flipping coins, and everyone flips ten times.
- There are many people flipping coins, and each person conducts 100 flips.
- She is the only person flipping a coin, and she conducts 100 flips.
| a |
Fool the Professor
This activity illustrates the fact that pure randomness can and will generate apparent patterns. Each class is split into two halves, with one half generating a random string of coin flips and the other half coming up with a string of coin flips that should “fool the professor” into thinking that that is the random string. The upshot is that the true random string tends to contain more long consecutive heads (or tails) than the fake random string.
| If the activity is done in multiple small sections, aggregate the two strings (one true random and one fake random) across all classes. The final two long strings are to be presented to the professor at the plenary session. To make sure the strings continue from those of the previous class, read the 10 trailing coin flips to the students before they generate the new strings. |
Collect Questions for Plenary
(5 min) Collect remaining questions from the students for faculty in plenary (can be questions for clarification, extension, discussion, etc.), and add [ here].

