 # Before you begin, you should set the random seed to your birthday m...

## Question

Before you begin, you should set the random seed to your birthday month, day, and year. For example, April 4, 1992 would be 441992. You should set the seed only once in your entire document.

Problem 1: Consider a characteristic whose population is normally distributed with mean 121.8 and standard deviation 34.7. A practitioner studying this characteristic does not know its population mean or standard deviation, though she suspects that the mean is greater than 120. The practitioner is correctly planning to use a one-sample t-test. She assumes a moderate effect size and would like for her test to have 80% power. Based on her assumptions, what should her sample size be?

Problem 2: Consider the situation in Problem 1.
(a) Use Monte Carlo simulation to estimate the power of the practitioner’s planned test. Did she achieve her 80% goal?
(b) What is the true effect size of the practitioner’s test?
(c) Use a while loop to determine the smallest whole number null value assumption (beginning with the value as planned) that the practitioner could use to achieve 80% power for her test. For each iteration, record the true effect size and the estimated power. What is the corresponding effect size? Is this what you expected?
(d) Use the appropriate power function to determine the expected power for each effect size calculated in part (c).
(e) Compare the estimated power and expected power for each effect size. What conclusions can you draw? How would you use this information in planning a study?

Problem 3: Consider the situation in Problem 1.
(a) Use a while loop to determine the smallest approximate sample size that the practitioner could use to achieve 80% power for her test as otherwise planned. (Begin with the planned sample size and increase it by 100 for each iteration.) For each iteration, record the estimated power and corresponding sample size. Does the magnitude of the needed sample size seem plausible for her study?
(b) Use the appropriate power function to determine the expected power for each sample size used in part (a).
(c) Compare the estimated power and expected power for each sample size. What conclusions can you draw? How would you use this information in planning a study?

Problem 4: Consider the situation in Problem 1. If the practitioner were to assume that the true mean is 105 for the planned hypothesis test, the effect size would be approximately 0.5.
(a) Use a while loop to determine the smallest sample size that the practitioner could use to achieve 80% power for her test assuming that the mean is 105. (Begin again with the planned sample size.) For each iteration, record the estimated power and corresponding sample size.
(b) Use the appropriate power function to determine the expected power for each sample size used in part (a).
(c) Compare the estimated power and expected power for each sample size. What conclusions can you draw? Are your conclusions different than those for the previous problems? How would you use this information in planning a study?

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Problem 1. He needs a sample size of at least 27 to achieve at least 80% power. Please see program below. Here we assume that α=.05.
> power<-function(N,Null=120,Ha=120+0.5*34.7){
+ c <- qt(.95,df=N-1)/sqrt(N)*34.7+Null
+ 1-pt((c-Ha)/34.7*sqrt(N),df=N-1)
+ }
>
> i<-2
> while(power(i)<0.80) {
+ i<-i+1
+ }
> i;power(i)
 27
 0.8098334...

By purchasing this solution you'll be able to access the following files:
Solution.docx.

\$55.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.