QuestionQuestion

Transcribed TextTranscribed Text

Problem 1 Imagine you perform preliminary "pilot' study to establish the average daily sugar consumption (in mg/day) for UIUC students. In this study you took simple random sample of 2= 100 students and recorded each subject's daily sugar consumption. Your original hypothesis was that the true average daily sugar consumption was = 300, and you tested this null hypothesis against the two sided alternative = 300. In the original study your 95% confidence interval was: 263,310 This provides some evidence that the true mean less than 300, so you decide to take second sample to test the hypothesis of sl 300 vs 300. (a) If IN and 0.05 for what values of would you reject the null hypothesis at the level? (Be sure to consider the alternative in finding your answer). (b) If the true population standard deviation is 142 and H 300 and = 100. for what values of will you reject the null hypothesis Ho? (c) If the true population standard deviation s = = 142 and 315 and = 100, what is the probability that will fall into the region defined in (b)? (d) If you want 80% power to reject the null hypothesis, when the truth is that =315, do you achieve that goal? What can you doto increase the amount of power you have? (e) Use the following code to find sample size that has at least 80% power n <- c() # Replace this with the samp le sizes you want to try and change eval FALSE to eval TRUE cutoffs <- qnorn(c 05, nean 300. sd - 142/sqrt(n)) power <- pnorn (cutofis, mean 315, ad 142/egrt(n)) nanes (power) <- n print(power) Problem 2 You have two proposed categorical distributions for categorical variable x = 1 2 3 4 5 6 po(x) 0.1 0.1 0.2 0.1 0.1 0.1 0.3 p1(x) 0.2 0.1 0.2 0.1 0.2 0.1 0.1 You have : single observation x and what to test the hypothesis Ho H1 p1 (In other words, that po correct versus correct.) 1 Use the decision rule that you will reject Ho if <2 and accept otherwise (a) Find the probability of : Type error. (b) Find the probability of : Type II error. (c) Propose a new decision rule where the probability of Type error is 0.2 and has the maximum power (minimum Type II error) of any possible decision rule with =0.2. (d) For any given (maximum Type error), describe procedure to get test that has Type error less than and maximum power In other words, generalize the procedure vou used in (c) for any a. (Note the logic for this test is known as "likelihood ratio test and forms the basis for many of the key results statistics.) Problem 3 For the hypothesis H1:p>8 The one-sample statistic for sample of (a) What are the degrees of freedom for t? (b) Compute the -value for this hypothesis (recall: you can use the pt function to get the probability of a -distributed variable less than given value) (c) the value = .99 significant at the 5% level? What about the 1% level? (d) the sample size was 16 and the sample standard deviation was 12, give 90% one sided confidences interval for Problem 4 How many friends do your Facebook friends have? Do they have more friends than you do? (a) Go to your Facebool profile page. Next to the "Friends" tab you will see count of your friends. Call this value p and record here: (b) Propose hypothesis about the number of friends that your friend: have compared tothe number of friends that you have. The hypothesis can beone-sided or two-sided Clearly state the null hypothesis and the alternative hypothesis (c) Now click on your friend: tab. Do your best to "randomly' select 20 friends by scrolling through your list. For each friend you "sample" record the number of friends that friend has (do not include their names to maintain confidentiality). friends <- c<) put your values here (d) Evaluate the sample data graphically and write short summary of your findings. Do you think is appropriate to use t-test to address the hypothesis in (b)? (e) Using t-test. test the hypothesis in (b). Would you reject the hypothesis that your friend: have the same number of friends you do at the 5% level? (f) Report 95% confidence interval based on the hypothesis test in (b) (take note of whether you proposed one or two sided hypothesis test) (g) Interpret these resulta with respect to the original question? What do you conclude about the number of friends of your friends? Problem 5 Researchers were interested in comparing the long-term psychological effects of being on high-carb diet vs low-carb diet. 106 participants were randomly assigned to one of two energy -restricted dieta. At 52 weaks only 32 low-carb and 33 high carb dieters remained Subject mood was assessed with total mood dist arbance score (TMDS), where lower score associated with less negative mood Here are the results (diet <- data frame (row names c<"Low", "High"), c(32, 33). xbar = c(47.3, 19.3), ## xbar ## Low 32 47.328.3 ## High 33 19.3 26.8 (a) Is there difference between the low and high groups after 52 weeks? Test the null hypothesis that true average subjects TDMS response under the low carb diet is the same as the average under the high carb condition Use significance level of 0.05. (b) Critics of this study focused on the specifics of the diets under study but also on the high drop out rates. Explain why the drop rabe important to consider when drawing conclusions from this study. (c) Write simulation based on your answer to (b). (Hint: think about simulating from some known distributions for the treated and control groups. In each simulated experiment remove some subjects due to drop ou and perform hypothesis test Do the hypothesis tests achieve their stated error rates?)

Solution PreviewSolution 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.

(a) If $z = \frac{\bar x - 300}{\sigma/\sqrt{n}}$ and $\alpha = 0.05$, for what values of $z$ would you reject the null hypothesis at the $\alpha$ level? (Be sure to consider the alternative in finding your answer).
```{r}
qnorm(0.05, lower.tail = FALSE)
```
(b) If the true population standard deviation is $\sigma = 142$ and $\mu = 300$ and $n = 100$, for what values of $\bar x$ will you reject the null hypothesis $H_0$?
If the $\bar x$ is greater than the following value:
```{r}
sigma <- 142; mu <- 300; n <- 100
xbar <- qnorm(0.05, lower.tail = FALSE)*sigma/sqrt(n)+mu
print(xbar)
```
(c) If the true population standard deviation is $\sigma = 142$ and $\mu = 315$ and $n = 100$, what is the probability that $\bar x$ will fall into the region defined in (b)?
```{r}
sigma <- 142; mu <- 315; n <- 100
z <- (xbar - mu)/(sigma/sqrt(n))
print(pnorm(z,lower.tail=FALSE))
```
(d) If you want 80% power to reject the null hypothesis, when the truth is that $\mu = 315$, do you achieve that goal? What can you do to increase the amount of power you have?
The power of a test is the probability of rejecting $H_0$ when $H_1$ is true. The solution to the
previous questions is actually the power of a test given $\alpha=.05$, 0.2780931 < 0.80. Increasing the sample size n help increase the power...

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

$63.00
for this solution

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.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats