The code online outputs p-value ~ 0.996. Latest Rstudio release (linux) produces similar output.
This may originate from 'orig_diff' calculated as minus 0.292, as indicated at:
https://github.com/OpenIntroStat/ims-tutorials/issues/142
However, a change to force 'orig_diff' = .292 did not change output to expected ~0.03 (in Rstudio). This begs addressing because it's fundamental.
Reproducible Example
Transcribing the code:
gender_discrimination_perm |>
get_p_value(obs_stat = diff_orig, direction = "greater")
Expected Behavior
Transcript of tut. text: "You may have noticed that the observed statistic is borderline “significant” (p-value = 0.03) for the original data."
Contact Details
No response
Bug
The code online outputs p-value ~ 0.996. Latest Rstudio release (linux) produces similar output. This may originate from 'orig_diff' calculated as minus 0.292, as indicated at: https://github.com/OpenIntroStat/ims-tutorials/issues/142 However, a change to force 'orig_diff' = .292 did not change output to expected ~0.03 (in Rstudio). This begs addressing because it's fundamental.
Reproducible Example
Transcribing the code:
gender_discrimination_perm |> get_p_value(obs_stat = diff_orig, direction = "greater")
Expected Behavior
Transcript of tut. text: "You may have noticed that the observed statistic is borderline “significant” (p-value = 0.03) for the original data."
Session Info
No response
Additional context
No response