Question

In: Statistics and Probability

I. Simulate a binomial random variable. Consider a class with 60 students, and the probability that...

I. Simulate a binomial random variable. Consider a class with 60 students, and the probability that a student does not turn in a homework is 0.10 (a “success”). Assume all students are independent of all other students, and the probability does not change.(a) Use sample to simulate drawing 60 students who either do, or do not, turn in their homework, and then find the total (out of 60) who did not turn in their homework. You should return one number,X= total # of students out of 60 who did not turn in their homework.

Solutions

Expert Solution

Using R

Following are the steps,

  1. Draw a random number from uniform distribution in the interval (0,1)
  2. If the random number is less than 0.10 ( a success), mark the student as did not turn in a homework , otherwise mark the student as did turn in the homework
  3. Do the steps 1 and 2, a total of 60 times
  4. Sum the number of students who did not turned in the home work. This is the value of X=total # of students out of 60 who did not turn in their homework.

R code with comments (all statements starting with # are comments

#get this output

X=4 in this first draw from Binomial distribution.


Related Solutions

If x is a binomial random​ variable, use the binomial probability table to find the probabilities...
If x is a binomial random​ variable, use the binomial probability table to find the probabilities below. a. P(x<6) for n = 15, p=0.2 b. P(x>=14) for n=20, p=0.8 c. P(x=23) for n=25, p=0.1
If x is a binomial random​ variable, use the binomial probability table to find the probabilities...
If x is a binomial random​ variable, use the binomial probability table to find the probabilities below. a. P(x=3) for n=10, p=0.5 b. P(x≤4) for n=15, p=0.3 c. P(x>1) for n=5, p=0.2 d. P(x<6) for n=15, p=0.8 e. P(x≥14) for n=25, p=0.8 f. P(x=3) for n=20, p=0.1
Use Excel to generate the probability distribution for a binomial random variable for which there are...
Use Excel to generate the probability distribution for a binomial random variable for which there are 20 trials (n = 20) and the probability of success is 0.5 (p = 0.5), and show the graph.
The age of a students in a class is a normal random variable. There are 80...
The age of a students in a class is a normal random variable. There are 80 students in our class. I select 9 students randomly and calculate the mean of their ages (sample mean). I repeat this experiment 1,000,000 times. Then I calculate the mean and standard deviation of the 1,000,000 sample means that I measured; the calculated values are 22 and 4, respectively. What is the probability that the age of a randomly selected student in the class is...
Probability Mass Functions, Random Variables Find a table of the Binomial random variable (include a picture...
Probability Mass Functions, Random Variables Find a table of the Binomial random variable (include a picture of the table in your submission) and obtain the probability that in 20 independent trials, each of which has probability of success equal to 0.1, the number of successes is less than or equal to 3. Repeat the problem using instead of a Binomial a Poisson with suitable parameter lambda.
Assume the random variable X has a binomial distribution with the given probability of obtaining a...
Assume the random variable X has a binomial distribution with the given probability of obtaining a success. Find the following probability, given the number of trials and the probability of obtaining a success. Round your answer to four decimal places. P(X=6), n=10 , p=0.5
Assume the random variable X has a binomial distribution with the given probability of obtaining a...
Assume the random variable X has a binomial distribution with the given probability of obtaining a success. Find the following probability, given the number of trials and the probability of obtaining a success. Round your answer to four decimal places. P(X≤4), n=7, p=0.6
Assume the random variable X has a binomial distribution with the given probability of obtaining a...
Assume the random variable X has a binomial distribution with the given probability of obtaining a success. Find the following probability, given the number of trials and the probability of obtaining a success. Round your answer to four decimal places. P(X=14), n=15, p=0.7
Plot using RStudio Consider a binomial random variable, X. i. Plot the pmf of X ∼Bin(n...
Plot using RStudio Consider a binomial random variable, X. i. Plot the pmf of X ∼Bin(n = 10, p = 0.3). ii. Plot the pmf of X ∼Bin(n = 10, p = 0.7). iii. Plot the pmf of X ∼Bin(n = 100, p = 0.3). iv. What happens to the shape of the pmf of X ∼Bin(n, p) when p gets larger? v. What happens when n gets larger
Let N be a binomial random variable with n = 2 trials and success probability p...
Let N be a binomial random variable with n = 2 trials and success probability p = 0.5. Let X and Y be uniform random variables on [0, 1] and that X, Y, N are mutually independent. Find the probability density function for Z = NXY . Hint: Find P(Z ≤ z) for z ∈ [0, 1] by conditioning on the value of N ∈ {0, 1, 2}.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT