[R] Constructing a barplot in R

SIrEllwood jamieellwood at hotmail.com
Fri Mar 6 00:03:39 CET 2009


Hi all,

3.  The probabilities are 0.06, 0.21, 0.24, 0.18, 0.14, 0.10, 0.04, 0.02 and
0.01 that an airline will
receive 0,1,2,3,4,5,6,7 or 8 complaints per day about its luggage.Find

e(x) and e(x^2)

Give the R commands you use and the two numerical values.

Use the sample function to simulate complaints over 500 days. Give
the R command you use and draw a barplot of the simulated data. Comment on
how the pattern
you see relates to the probabilities in the question above.

I think i have done the first part and got e(x) = 2.75 and e(x^2)= 10.59

I have no idea how to simulate complaints over 500 days and draw a barplot.

can anyone help?

Thank you in advance
-- 
View this message in context: http://www.nabble.com/Constructing-a-barplot-in-R-tp22362753p22362753.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list