Good afternoon, I'd like to know how to superimpose a Student distribution pt on a histogram. I think I have to use the plot function but I don,t know the details. Other question: what is a quntile function? Can you help me? Thank you.
(no subject)
3 messages · Angela Re, Peter Dalgaard, (Ted Harding)
Angela Re <angelare at to.infn.it> writes:
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Please do. You have been told before.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
On 26-Nov-04 Angela Re wrote:
Good afternoon, I'd like to know how to superimpose a Student distribution pt on a histogram. I think I have to use the plot function but I don,t know the details.
x<-rt(5000,4) # draw a sample from t with df=4 hist(x,breaks=0.5*(-40:40)) # draw histogram with bin-width=0.5 x0<-0.1*(-200,200) # breakpoints for pt plot lines(x0,dt(x0,4)*5000*0.5) # superimpose the pt plot DON'T use 'plot' for the last one: it will create a new plot, while 'lines' (like 'points') adds a plot to an existing plot.
Other question: what is a quntile function?
(?quantile) Given a distribution P(X <= x) for a random variable X, the quantile of the distribution corresponding to probability p (or percentage 100*p) is the value x_p such that P(X <= x_p) = p (when using percentages it is usually called the percentile). Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 [NB: New number!] Date: 26-Nov-04 Time: 16:47:29 ------------------------------ XFMail ------------------------------