Dear Grooup
kindly
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:
x=c(0,1,3)
px=c(.25,.125,.5)
plot( x,px ,type="h" ) # to plot the frequency , is it correct
how to plot the cdf?
thanks in advance
Ragia
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.