Repository navigation
Spread the stress scores that piled up at 40 - #58
Merged
Merged
Conversation
Stress was drawn from an exponential and clipped at 40, which put 190 of the 5000 students on exactly 40.00. A draw past 40 now wraps back round to the start of the scale instead. The exponential is memoryless, so the result is the same skewed shape cut off at 40, with no spike. The 189 students who changed also get new sleep and exam scores, so every number Modules 5 to 8 quote from the population was recomputed in R and updated. The power exercise in 8-3 now passes from .83 to .95, because the design's power rose from about .75 to about .89.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: stress in
wellbeing-population.csvwas clipped at 40, so 190 of the 5000 students sat on exactly 40.00. That showed up as a spike at the right edge of every stress histogram.After: stress still runs from 0 to 40, like the Perceived Stress Scale, with the same skewed shape and no spike.
How: a draw past 40 now wraps back round to the start of the scale instead of being clipped (
scripts/generate-datasets.mjs). Because the exponential is memoryless, the result is exactly an exponential cut off at 40. The number of random draws is unchanged, so only the 189 students who were at the ceiling change. Their sleep and exam scores change too, because both depend on stress.workplace.csvis unchanged.Every lesson code block in Modules 5 to 8 that reads the population was run in R on the old and the new data. Each number the lessons quote from that output was then updated: means, SDs, z-scores, cut-offs, the confidence intervals in 7-1 and 7-2, the Business row in 7-3, the sleep study's t-test, p-value and d in 8-1 to 8-4, and the power figures in 8-3. The checks recompute from the CSV already, so only their comments and two hard-coded figures changed.
One exercise changed for real. In 8-3 the design's power rose from about .75 to about .89, so the passing band for
power_estimatemoved from .67 to .85 up to .83 to .95. "Counted the failures" (.11) and "only 10 students" (.14) now fall too close together to tell apart, so they share one message.