[R] cdf in R give probability of random variable
ragia11 at hotmail.com
Fri Oct 21 18:30:07 CEST 2016
how can I plot these graphs in R..
Suppose that X is a discrete random variable with P(X = 0) = .25, P(X = 1) =
.125, P(X = 2) = .125, and P(X = 3) = .5. Graph the frequency function and
the cumulative distribution function of X.
my solution was:
plot( x,px ,type="h" ) # to plot the frequency , is it correct
how to plot the cdf?
thanks in advance
[[alternative HTML version deleted]]
More information about the R-help