Question

In: Statistics and Probability

This is a question answered by R. **In this problem, we'll use simulation to think about...

This is a question answered by R.

**In this problem, we'll use simulation to think about survey sampling. Suppose I want to plan a survey to learn what percentage of students prefer coffee to tea.**

a. **Let *X* be the number of students in my sample that prefer coffee. If I survey *n* students, and the true proportion of students that prefer coffee is *p*, then we can model *X* as a Binomial(*n*, *p*) random variable. If I survey ten students, what is the theoretical probability that more than 60% of my sample prefer coffee? Your answer should be a formula or an R command you could use to answer this question for any p**

c. **We can also use simulation to explore this situation. Generate 1000 samples from a Binomial(10, 0.5) random variable X. What proportion of generated samples have sample proportions greater than 60%? Using your formula from a. with p = 0.5, calculate the theoretical probability of observing a sample proportion greater than 60% and compare. **

Solutions

Expert Solution

We see that, the simulated proportion is pretty close to the theoritical probability.


Related Solutions

Q3. (This question is based in R) Now use the simulation ("X = rnorm(1000, mean =...
Q3. (This question is based in R) Now use the simulation ("X = rnorm(1000, mean = 10, sd = 2)", "Y = rnorm(1000, mean = 5, sd = 3)") to estimate the distribution of X+Y and create confidence intervals. A) Form a set of Xs and Ys by repeating the individual experiment for B = 2000 times, where each experiment has n = 1000 samples. You may want to write a for loop and create two matrices "sample_X" and "sample_Y"...
Problem 6: R simulation. Use different color lines and appropriate legend to (1) plot the density...
Problem 6: R simulation. Use different color lines and appropriate legend to (1) plot the density functions of χ 2 k for k = 1, 2, 3, 4, 6, 9 in one figure; (2) plot the density functions of tk for k = 3, 5, 10, 30 and N(0, 1) distribution in one figure. Describe respectively what you observe when the degree of freedom increases.
In this discussion, we'll talk about the nurse-client relationship and the use of therapeutic communication as...
In this discussion, we'll talk about the nurse-client relationship and the use of therapeutic communication as an important part of that relationship. Please answer the following questions: What are your concerns or fears about mental health nursing in general? Are you interested in mental health nursing, or do you approach the topic with some anxiety? What do you feel are essential aspects of a good nurse-client relationship? Please include an example of how you established good rapport and a good...
In this discussion, we'll talk about the nurse-client relationship and the use of therapeutic communication as...
In this discussion, we'll talk about the nurse-client relationship and the use of therapeutic communication as an important part of that relationship. Please answer the following questions: What are your concerns or fears about mental health nursing in general? Are you interested in mental health nursing, or do you approach the topic with some anxiety? What do you feel are essential aspects of a good nurse-client relationship? Please include an example of how you established good rapport and a good...
Develop a Research Question: In your area of interest, think about a research question that could be answered using a hypothesis test for a mean
  For this Discussion please complete the following: Develop a Research Question: In your area of interest, think about a research question that could be answered using a hypothesis test for a mean (see Live Binder video for examples). Write down this research question and explain what your research is trying to investigate. State the Hypotheses: Using your research question, create the null hypothesis that will be tested and the alternative hypothesis. Be sure to use the symbols Ho for...
(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all...
(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all six faces appear exactly once in six tosses of fair dice.
The Nurse-Client Relationship In this discussion, we'll talk about the nurse-client relationship and the use of...
The Nurse-Client Relationship In this discussion, we'll talk about the nurse-client relationship and the use of therapeutic communication as an important part of that relationship. Please answer the following questions: What are your concerns or fears about mental health nursing in general? Are you interested in mental health nursing, or do you approach the topic with some anxiety? What do you feel are essential aspects of a good nurse-client relationship? Please include an example of how you established good rapport...
4. (Applying LU and LUP decompositions) In this problem, we'll use the LU/LUP decomposition to solve...
4. (Applying LU and LUP decompositions) In this problem, we'll use the LU/LUP decomposition to solve a linear system of equations. a) For A = [12 -8 13 -1 13;14 11 -5 -5 -7;1 -8 -9 10 8;-11 10 -8 3 8;-11 -8 4 2 -4] find matrices P, L, and U so that PA = LU using Matlab's lu function. Based on your results: did Matlab use pivoting during the lu-computation? b) For b = [4;-4;-5;3;7] solve Ax =...
These are the answered multiple choice questions about the forces in the Student and Backpack problem....
These are the answered multiple choice questions about the forces in the Student and Backpack problem. Make a clear diagram which properly identifies all of the forces acting on the student (you will also need a similar, separate, diagram for the backpack), and then making the proper arguments leading to the correct answer. (a) Which is stronger force, the force on the student by the backpack or the force on the backpack by the student? The two forces are equally...
Question A Let’s think about the use of Lists in everyday life. Provide an example and...
Question A Let’s think about the use of Lists in everyday life. Provide an example and discuss the advantages and disadvantages of using these types of Lists. Question B Considering the lessons on menu logic and the use of arrays and loops, how does this change your programming capabilities? What kind of programs can you now create utilizing these powerful programming tools? Describe an example program that, before this week, was not possible or infeasible for you to program.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT