1. Other
2. Other
3. r1 in class we saw that if a computer is...

# Question: r1 in class we saw that if a computer is...

###### Question details

R1. In class, we saw that if a computer is correctly generating random numbers from the exponential distribution, then about 50% of those numbers will be less than the median. In fact, there is nothing special about using the median and 50%. What percent of the random numbers generated from Exp(λ) should be less than the number q > 0? (This does not require the computer to solve.) R2. The goal in this problem is to create something called a P-P plot (you’ll need the result from R1 at a key place). Here’s the idea: We start by choosing (say) 100 values for q evenly spaced between 0 and 10 (qvals). We also generate (say) 100000 random numbers from what R claims is an exponential distribution with (say) λ = 1/2. Using a for loop, for each value of q, we calculate what percentage of numbers from the exponential distribution we expect to be less than q (see R1), and also, what percentage of numbers from our list of 100000 that actually are less than q. After doing all this, we plot the 100 expected percentages against the 100 actual percentages. Think about what graph we should get before you complete the code and then run the below code. Include a rough sketch of your plot and explain why it is shaped the way it is.