

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: INTR THY PROBAB&S I; Subject: STATISTICS; University: Iowa State University; Term: Unknown 1989;
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


A discrete random variable is said to have a geometric distribution if
p(y) = p(1 − p)y−^1 for y = 1, 2 ,...
μ = E(Y ) =
p
σ^2 = V (Y ) =
1 − p p^2
Working with geometric random variables in R.
The R built-in function for the geometric distribution defines the random variable Y differently than your textbook. To avoid any confusion, I have written functions in R called geo which use the R built-in functions for the geometric distribution to calculate probabilities and generate random values from the geometric random variable Y as defined in your textbook. Before you use R for the geometric distribution, you will need to copy and paste the following functions into the command window.
dgeo<- function(y,p){dgeom(y-1,p)} rgeo<- function(n,p){rgeom(n,p) + 1}
To find a probability P (Y = y) = p(y) for a single value y, the command in R is
dgeo(y,p)
To find the probability P (Y ≤ y), use the sum command to add up all p(y) values for y between and including 1 and y.
sum(dgeo(1:y,p))
To find the probability P (y 1 ≤ Y ≤ y 2 ), use the sum command to add up all p(y) values for y between and including y 1 and y 2.
sum(dgeo(y1:y2,p))
To find the probability P (Y ≥ y) = 1 − P (Y < y) = 1 − P (Y ≤ y − 1), use the sum command to find P (Y ≤ y − 1) and subtract this value from 1.
1 - sum(dgeo(1:y-1,p))
Problems.
(a) What is the probability that the third hole drilled is the first that yields a productive well? (b) If the prospector can only afford to drill at most ten wells, what is the probability that he fails to find a productive well? (c) How many wells would the prospector expect to drill before he finds a productive well?
(a) What is the probability that the first seven will occur on the 5th roll? (b) What is the probability that the first seven will occur somewhere in the first 5 rolls? (c) How many rolls would you expect to make to obtain the first seven?