Question

In: Statistics and Probability

in R To explore the characteristics of a Type I error rate, write the R code...

  1. in R

  2. To explore the characteristics of a Type I error rate, write the R code to do the following:

    1. (a) Generate 30 values from X~N(μX =10,σX=4) and 30 values from Y~N(μY =10,σY=4). Do not print any of these values. Use a t-test to test the hypotheses given above. (You are allowed to use the built-in R function to perform the t-test.)

    2. (b) Include a comment in your code that identifies the p-value and clearly state the conclusion of the test in part (a). The conclusion is either “Reject H0” or “Do not reject H0”.

    3. (c) Repeat part (a) 4000 times, and retain the p-value for each of the 4000 tests. Each repetition should generate a new sample for x and a new sample for y.
      Do not print the x values or the y values or the p-values for any of these tests.
      Do not use a loop to perform the repetitions.

    4. (d) Calculate the proportion of the 4000 repetitions in which H0 is rejected. Include a comment in our code that provides the proportion.

    5. (e) Generate a histogram of the 4000 p-values.

    6. (f) Include a comment in your code to answer the question: What probability distribution do the p- values appear to follow?

Solutions

Expert Solution

R code along with output is given below.


Related Solutions

What is a Type I Error? What is the impact on Type II Error if we...
What is a Type I Error? What is the impact on Type II Error if we reduce the likelihood of Type I Error? Please upload in Microsoft Word.
Describe what would be a type I error and what would be a type II error:...
Describe what would be a type I error and what would be a type II error: A restaurant claims more than 42% of its new patrons return at least once within a month.
Please provide an example of both a Type I Error and Type II Error. Why is...
Please provide an example of both a Type I Error and Type II Error. Why is it that increasing the sample size reduces the probability of a Type II error to an acceptable level. Please discuss.
What is Type I error? How do we correct for Type I error? What happens when...
What is Type I error? How do we correct for Type I error? What happens when we correct for Type I error? What is Type II error? How do we correct for Type II error? What happens when we correct for Type II error? How can we correct for both Type I and Type II error at the same time? Which error is considered the worst type of error to commit?
If you want an overall type I error rate of 0.05 for your study, why is...
If you want an overall type I error rate of 0.05 for your study, why is testing at the 0.05 level not appropriate for interim analysis of efficacy? What can you do to conduct appropriate interim analysis of efficacy?
Q3) The goal of this question is to explore the impact of bit error rate (BER)...
Q3) The goal of this question is to explore the impact of bit error rate (BER) on the packet error for multihop wireless networks. Assume a packet of size 512 bytes is transmitted across intermediate nodes until reaching its destination. Assume a communication channel has bit error rate (BER) = 10^-5. What is the probability of packet receiving incorrectly over 50 links?
Which one is the best? Type I error of Type II error? Support your choice as...
Which one is the best? Type I error of Type II error? Support your choice as an industrial engineer
Find the probability of a false positive (Type I error) or false negative (Type II error).
Find the probability of a false positive (Type I error) or false negative (Type II error).
How is statistical power related to the following concepts: Type I error, Type II error, variance,...
How is statistical power related to the following concepts: Type I error, Type II error, variance, effect size, and sample size.
State the hypotheses. Describe a Type I and Type II error in the context of the...
State the hypotheses. Describe a Type I and Type II error in the context of the problem and a consequence of each. Determine which type is most serious. State whether alpha should be set high or low (based on whether or not you feel a Type I error is the most serious or not). The state of Georgia is considering spending $350 million on a computerized mathematics curriculum that for grades 3 – 10. They pilot the program with 250...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT