Question

In: Statistics and Probability

Write a program to choose a random number X in the interval [2,10] 1000 times and...

Write a program to choose a random number X in the interval [2,10] 1000 times and record what fraction of the outcomes satisfy X > 5, what fraction satisfy 5 < X < 7, and what fraction satisfy x2 −12x+35 > 0. How do these results compare with Exercise 1?

Solutions

Expert Solution

Since is chosen randomly from the interval, no area of the interval is more likely to be drawn from than any other. The density function for the outcome of is uniform (constant).

The cumulative distribution function, , is:

where

   where

  where   

The probability density function, , is the derivative of the cumulative distribution function:

   where   

   where   

     where   

And the probability of some event occurring where is a sub interval of is

For,

For,

  

And For,

  

Thus, the program is

Experimental results from drawing a random real number from times:


Related Solutions

Write a program to implement the Romberg Algorithm. Input: f(x), an interval [a,b], N (the number...
Write a program to implement the Romberg Algorithm. Input: f(x), an interval [a,b], N (the number of subintervals on the finest grid on level 0 is 2^N, therefore, N is usualy a small integer) Output: the triangle generated by Romberg Algorithm.
The random variable x is the number of occurrences of an event over an interval of...
The random variable x is the number of occurrences of an event over an interval of ten minutes. It can be assumed that the probability of an occurrence is the same in any two-time periods of an equal length. It is known that the mean number of occurrences in ten minutes is 5.3. The probability that there are 8 occurrences in ten minutes is a. .0771 b. .0241 c. .1126 d. .9107
Let X be a random variable that is equal to the number of times a 5...
Let X be a random variable that is equal to the number of times a 5 is rolled in three rolls of a fair 5-sided die with the integers 1 through 5 on the sides. What is E[X2 ]? What is E2 [X], that is, (E[X])2 ? Justify your answers briefly
Define the random variable X to be the number of times in the month of June...
Define the random variable X to be the number of times in the month of June (which has 30 days) Susan wakes up before 6am a. X fits binomial distribution, X-B(n,p). What are the values of n and p? c. what is the probability that Susan wakes us up before 6 am 5 or fewer days in June? d. what is the probability that Susan wakes up before 6am more than 12 times?
In C++ For this assignment, you will write a program to count the number of times...
In C++ For this assignment, you will write a program to count the number of times the words in an input text file occur. The WordCount Structure Define a C++ struct called WordCount that contains the following data members: An array of 31 characters named word An integer named count Functions Write the following functions: int main(int argc, char* argv[]) This function should declare an array of 200 WordCount objects and an integer numWords to track the number of array...
A coin is tossed three times. X is the random variable for the number of heads...
A coin is tossed three times. X is the random variable for the number of heads occurring. a) Construct the probability distribution for the random variable X, the number of head occurring. b) Find P(x2). c) Find P(x1). d) Find the mean and the standard deviation of the probability distribution for the random variable X, the number of heads occurring.
Random Number Guessing Game Write a program in C++ that generates a random number between 1...
Random Number Guessing Game Write a program in C++ that generates a random number between 1 and 100 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high. Try again.” If the user’s guess is lower than the random number, the program should display “Too low. Try again.” The program should use a loop that repeats until the user correctly guesses the random number....
Random Number Guessing Game C++. Write a program that generates a random number between 5 and...
Random Number Guessing Game C++. Write a program that generates a random number between 5 and 20 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display Too high. Try again. If the user’s guess is lower than the random number, the program should display Too low, Try again. The program should use a loop that repeats while keeping a count of the number of guesses...
Random Number Guessing Game (python) *use comments Write a program guess.py that generates a random number...
Random Number Guessing Game (python) *use comments Write a program guess.py that generates a random number in the range of 1 through 20, and asks the user to guess what the number is. If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." If the user guesses the number, the application should congratulate the...
*Write in C* Write a program that generates a random Powerball lottery ticket number . A...
*Write in C* Write a program that generates a random Powerball lottery ticket number . A powerball ticket number consists of 5 integer numbers ( between 1-69) and One power play number( between 1-25).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT