Discrete Probability Distributions
Create a vector
w
containing the integers
.
Assume
W
has the geometric distribution with parameter
. Evaluate the probability
for each of the values
w
in
w
. Save these values in a vector
fw
.
Evaluate the function
for each of the values
w
in
w
using the S function
cumsum
. Save these values in a vector
Fw
. What does
represent?
Using your vectors
w
,
fw
, and
Fw
, make a scatterplot of the geometric distribution function with parameter
.