Problem 2 (20 pts). To design a study, before collecting data, we need to decide the sample size n.

Problem 2 (20 pts). To design a study, before collecting data, we need to decide the sample size n. In some studies, it is expensive to collect data, but when the sample size is too small we will lose power to detect the “truth” that we wish to prove, i.e., we may not be able to find the “truth” when there is insufficient data or information. Sample size calculation is often based on a desirable power to detect a specific alternative hypothesis. As an illustration, we consider the following example. A researcher has developed a new treatment for reducing pain. She wishes to prove that the new treatment is effective, so she decides to collect some data and then use statistical methods to demonstrate the effectiveness of the new treatment. The pain score may be measured in a scale from 0 to 10, with 0 being no pain and 10 being most pain. Let?be the (unknown) average reduction in pain for all patients receiving the new treatment. The researcher needs to test the following hypotheses:H0 :?=0 versus Ha :?>0,i.e., whether the new treatment is effective or not, based on a significance level 0.05. Based on pre- vious related studies, the reduction in pain scores may be assumed to follow a normal distribution with a known standard deviation of 2.(a) (8 pts). There are many free online software that allows you to do sample size calculation. For example, the following site https:// ?rollin/stats/ssize/ is a nice one (please type this web address by hand, since directly clicking on it may not work due to the symbol “ ?”). Using this website, find the sample sizes for the following cases and summarize the results in a table:(i) The true values of ? are ? = 1, ? = 2, ? = 3 respectively, and the desired power is 80%.(ii) The true value of ? is ? = 1, and the desired powers are 70%, 80%, 90% respectively.(b) (8 pts). Derive the theoretical formula to calculate the sample size n based on true value ? = 1 and power 80%. Show the key steps. Compare your theoretical answer to that in question (a) to see if they are the same (or close).(c) (4 pts). Based on the results in (a) and (b), briefly summarize how the sample size is related to the specific alternative value ? and the desired power.