class: middle background-image: url(data:image/png;base64,#LTU_logo.jpg) background-position: top left background-size: 30% # STM1001 [Topic 11](https://bookdown.org/a_shaker/STM1001_Topic_11/) Lecture ## Statistical Power and Sample Size Calculation ### La Trobe University This lecture complements the [Topic 11 readings](https://bookdown.org/a_shaker/STM1001_Topic_11/) --- # Topic 11: Related Links ## Readings [Topic 11 readings](https://bookdown.org/a_shaker/STM1001_Topic_11/) ## Notation [Notation for Topic 11: Statistical Power and Sample Size Calculation](https://bookdown.org/a_shaker/STM1001_Topic_0/notation-summary.html#topic-11-statistical-power-and-sample-size-calculation) --- # Topic 11: Statistical Power and Sample Size Calculation **Overview** <iframe src="https://bookdown.org/a_shaker/STM1001_Topic_11/" width="100%" height="400px" data-external="1"></iframe> --- # Statistical Power and Sample Size Calculation * When designing a new study, it is important to determine an appropriate ***sample size*** -- * This is an important step in helping to ensure that the study achieves the outcomes it set out to achieve -- * As you may be able to imagine, if the sample size is not big enough, then the results of the study may not be strong enough to draw any significant or meaningful conclusions -- * However, increasing the sample size can come at a cost -- * This is why choosing an appropriate sample size is so important - so that a balance between these competing factors can be found -- * Sample size calculations are very much related to the concept of ***statistical power***, which we will briefly discuss now --- # What is statistical power? * Statistical power is a factor that helps determine how likely our study is to achieve its goals -- * You may recall learning about [Type I and Type II Errors](https://bookdown.org/content/50a3178d-5432-44a3-bb5c-1718ca3e1fe2/3-3-type-i-and-type-ii-errors.html) in [Topic 5](https://bookdown.org/content/50a3178d-5432-44a3-bb5c-1718ca3e1fe2/) -- * To recap, we can summarise these types of errors as follows: .content-box-blue[ .center[ **There are two types of error that can occur:** ] 1. **Type I error:** Reject `\(H_0\)` when `\(H_0\)` is true. 2. **Type II error:** Fail to reject `\(H_0\)` when `\(H_0\)` is false. ] --- # What is statistical power? Another way to think about Type I and Type II errors is via the following table: <img src="data:image/png;base64,#t12errors.png" width="1231" style="display: block; margin: auto;" /> -- * As we know, a <span style='color: red;'>Type I error</span> occurs when we reject `\(H_0\)` when `\(H_0\)` was actually true -- * The probability of this occurring is equal to the significance level `\(\alpha\)` -- * On the other hand, a <span style='color: red;'>Type II error</span> occurs when we fail to reject `\(H_0\)` when `\(H_0\)` was actually false -- * We can denote the probability of this occurring as `\(\beta\)` --- # What is statistical power? As it turns out, statistical power is the opposite of a <span style='color: red;'>Type II error</span>: <img src="data:image/png;base64,#t12errorspower.png" width="2092" style="display: block; margin: auto;" /> --- # What is statistical power? * That is, power is the probability of making the correct decision to reject `\(H_0\)` given that `\(H_0\)` is actually false -- * One way to understand statistical power would be to think of it like this: .content-box-blue[ .center[ **What is statistical power?** ] Statistical power is the probability of actually getting a significant result when it is truly there to be found. ] --- # What is statistical power? * Holding all other things equal, increasing the sample size will increase power, and decreasing the sample size will decrease power -- * However, increasing the sample size will increase the cost in most cases, and often with diminishing returns once a certain level of power is reached -- * Just like the significance level `\(\alpha\)`, which is typically chosen to be 0.05, a typical level of statistical power to aim for is 0.8 (or 0.9) -- * That is, sample sizes are often chosen such that, if `\(H_0\)` is false, the probability of rejecting `\(H_0\)` would be 0.8 --- # Sample size calculations * To carry out sample size calculations, we need to make some assumptions, or educated guesses, about various factors such as the standard deviation and effect size -- * ***Pilot studies*** involve carrying out the study but on a much smaller scale, in preparation for the main study * If a pilot study is carried out first, then this can help to determine the estimated standard deviation and other factors required for the sample size calculation --- # Example: One-sample `\(t\)`-test Suppose we wish to design a study to determine whether the average cholesterol level of patients from a particular population is different from 5.0 mmol/L. Further suppose the following: * The hypothesis test to be carried out will be a two-tailed test -- * The significance level is `\(\alpha = 0.05\)` -- * For the purposes of this study, a mean difference of at least 0.5 mmol/L is considered meaningful -- * Based on a pilot study, the estimated standard deviation for this population is 0.55 -- * We wish to choose a sample size to ensure a power of at least 0.8. -- Then, it turns out that the required sample size would be `\(n = 12\)`. -- In the computer labs we will learn how to carry out sample size calculations using a software package called G*Power (Faul, Erdfelder, Lang, and Buchner, 2007; Faul, Erdfelder, Buchner, and Lang, 2009). --- name: menti class: middle background-image: url(data:image/png;base64,#menti.jpg) background-size: 115% # Kahoot ## Go to [www.kahoot.it](https://www.kahoot.it) and use ## the code provided --- # References Faul, F., E. Erdfelder, A. Buchner, et al. (2009). "Statistical power analyses using G* Power 3.1: Tests for correlation and regression analyses". In: _Behavior research methods_ 41.4, pp. 1149-1160. Faul, F., E. Erdfelder, A. Lang, et al. (2007). "G* Power 3: A flexible statistical power analysis program for the social, behavioral, and biomedical sciences". In: _Behavior research methods_ 39.2, pp. 175-191. --- background-image: url(data:image/png;base64,#computerlab.jpg) background-position: bottom background-size: 75% class: center # See you in the computer labs! --- class: middle <font color = "grey"> These notes have been prepared by Amanda Shaker. The copyright for the material in these notes resides with the authors named above, with the Department of Mathematics and Statistics and with La Trobe University. Copyright in this work is vested in La Trobe University including all La Trobe University branding and naming. Unless otherwise stated, material within this work is licensed under a Creative Commons Attribution-Non Commercial-Non Derivatives License <a href = "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank"> BY-NC-ND. </a> </font>