Question

1.) Work through code on finding QQ-plot of a sequence of numbers shown on kaggle (no...

1.) Work through code on finding QQ-plot of a sequence of numbers shown on kaggle (no need to submit).
Generate 10000 random numbers from N(50,4), store them as a vector. It is expected that the sample mean of this vector should be close to the population mean 50. Verify this.
Suppose X~NB(3,0.8). More specificly, let X be the total numbers needed to achieve 3rd success in a sequence of independent repeated Bernoulli trials with success probability 0.8. Report the probability that P (5 < X ≤ 10).

2.) Simulate random samples from the following distributions:
Bernoulli(0.5) (so that μ = 0.5 and σ2σ2 = 0.25). (Hint: You can use rbinom to generate Bernoulli random numbers.)
Uniform(0, 1) (so that μ = 0.5 and σ2σ2 = 1/12).
Possion(1) (so that μ = 1 and σ2σ2 = 1).
For each case, set the number of simulations N to be 1000 and for each simulation, generate n = 2000 random numbers. Report 3 pieces of code, 3 Q-Q plots and your conclusion. You only need to slightly modify the demo code to get the right answer.

Homework Answers

Answer #2

answered by: anonymous
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly...
Conducting a Simulation For example, say we want to simulate the probability of getting “heads” exactly 4 times in 10 flips of a fair coin. One way to generate a flip of the coin is to create a vector in R with all of the possible outcomes and then randomly select one of those outcomes. The sample function takes a vector of elements (in this case heads or tails) and chooses a random sample of size elements. coin <- c("heads","tails")...
A state lottery randomly chooses 8 balls numbered from 1 through 39 without replacement. You choose...
A state lottery randomly chooses 8 balls numbered from 1 through 39 without replacement. You choose 8 numbers and purchase a lottery ticket. The random variable represents the number of matches on your ticket to the numbers drawn in the lottery. Determine whether this experiment is binomial. If​ so, identify a​ success, specify the values​ n, p, and q and list the possible values of the random variable x.
Language: Python Write a program to simulate an experiment of tossing a fair coin 16 times...
Language: Python Write a program to simulate an experiment of tossing a fair coin 16 times and counting the number of heads. Repeat this experiment 10**5 times to obtain the number of heads for every 16 tosses; save the number of heads in a vector of size 10**5 (call it headCounts). You should be able to do this in 1-3 lines of numpy code. (Use np.random.uniform1 to generate a 2d array of 10**5 x 16 random numbers between 0 and...
R Code Directions: All work has to be your own, you may not work in groups....
R Code Directions: All work has to be your own, you may not work in groups. Show all work. Submit your solutions in a pdf document on Moodle. Include your R code (which must be commented and properly indented) in the pdf file. Name this pdf file ‘your last name’-HW5.pdf. Also submit one text file with your R code, which must be commented and properly indented. You may only use ‘runif’ to generate random numbers; other random number generating functions...
A manufacturing facility has a repair shop with two repairmen who repair failed machines on a...
A manufacturing facility has a repair shop with two repairmen who repair failed machines on a first-fail-first-serve basis. They work together on the machine if there is one machine down (the repair still takes the same amount of time), and otherwise, each works on a separate machine. Thus, if there are more than two machines down, new failures simply wait for their turn to be repaired. Assume that machine failures arrive in a combined failure stream, so that we do...
please post solutions using R a manufacturing facility has a repair shop with two repairmen who...
please post solutions using R a manufacturing facility has a repair shop with two repairmen who repair failed machines on a first-fail-first-serve basis. They work together on the machine if there is one machine down (the repair still takes the same amount of time), and otherwise, each works on a separate machine. Thus, if there are more than two machines down, new failures simply wait for their turn to be repaired. Assume that machine failures arrive in a combined failure...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL...
Instructions: You are not required to use R markdown for the lab assignment. Please include ALL R commands you used to reach your answers in a word or pdf document. Also, report everything you are asked to do so Problem 2 : Answer the following questions: 1. First run alphas <- seq(0.1, 1, by = 0.1) and nalphas <- - rev(alphas). Based on what you have seen, describe how functions seq and rev work. Then run qnorm(c(nalphas, alphas)) and report...
Question (2) [5 marks] (Use R) Suppose you have a company producing cupcakes. Each cupcake is...
Question (2) [5 marks] (Use R) Suppose you have a company producing cupcakes. Each cupcake is supposed to contain 10 grams of sugar. The cupcakes are produced by a machine that adds the sugar in a bowl before mixing everything. You believe the machine does not add 10 grams of sugar for each cupcake. If your assumption is true, the machine needs to be fixed. You stored the level of sugar of thirty cupcakes. Note: You can create a randomized...
This worksheet is about doing simulations on a TI-83/84, but feel free to do the work...
This worksheet is about doing simulations on a TI-83/84, but feel free to do the work on a computer if you prefer. You are going to estimate the value of ? through a simulation. A circle inscribed in a 1x1 square has area ?/4 (you may want to draw a picture to convince yourself of this). Now, we can simulate picking points inside the square as follows: randomly select a value between 0 and 1 to be the x-coordinate, and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT