OpenIntroStat / ims-tutorials

Interactive tutorials developed with the learnr package supporting the textbook OpenIntro::Introduction to Modern Statistics.
https://openintrostat.github.io/ims-tutorials/
Other
33 stars 27 forks source link

Tutorial 4.2 - calculating the p-values #260

Open fernando-pierucci-alves opened 2 months ago

fernando-pierucci-alves commented 2 months ago

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