Skip to content

Commit

Permalink
Update check-power.qmd (attempt to fix numbered task list yet again)
Browse files Browse the repository at this point in the history
  • Loading branch information
langejulian authored Sep 9, 2024
1 parent b6b41c6 commit c429a43
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tutorial_pages/check-power.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ If we sample values from two normal distributions with different means (e.g. N(0
***

**YOUR TURN:**
1. Use your simulation skills to work out the power through simulation. Write a function that does the following:

i) Draws `n` values from a random normal distribution with `mean1` and another `n` values from a normal distribution with `mean2`.
ii) Compares the means of these two samples with a *t*-test and extracts the *p*-value.

2. Replicate the function 1000 times using the parameters used in the power calculation above (that used the `power.t.test()` function).
3. Calculate the proportion of *p*-values that are smaller than 0.05.
1. Use your simulation skills to work out the power through simulation. Write a function that does the following:
i. Draws `n` values from a random normal distribution with `mean1` and another `n` values from a normal distribution with `mean2`.
ii. Compares the means of these two samples with a *t*-test and extracts the *p*-value.
2. Replicate the function 1000 times using the parameters used in the power calculation above (that used the `power.t.test()` function).
3. Calculate the proportion of *p*-values that are smaller than 0.05.

***

Expand Down

0 comments on commit c429a43

Please sign in to comment.