[R-sig-teaching] Help with graph joint pdf
Sebastián Castro
scastro at iesta.edu.uy
Thu Jun 4 19:35:55 CEST 2009
I would do it in this way:
###########################################################################
u=seq(0.0001,1,0.1)
v=u
f=outer(u,v, function(u,v) 18*(u/v)*(1-u/v))
f
for (i in 2:length(u)) {
for (j in 1:(i-1)) {
f[i,j]=0
}
}
f
persp( u, v, f, phi=30, theta=-30,col='red')
###########################################################################
Surely you (or someone) have a better solution to share.
Sebastián.
> Dear All: Please ignore my previous email. I fixed the joint pdf.
>
>
> How I can get the graph of the joint pdf:
>
> f(u,v)=18 v (u/v) (1-(u/v)) for 0<u<v and 0<v<1, and 0 otherwise.
>
> With many thanks
>
> Abou
>
>
> ==========================
> AbouEl-Makarim Aboueissa, Ph.D.
> Assistant Professor of Statistics
> Department of Mathematics & Statistics
> University of Southern Maine
> 96 Falmouth Street
> P.O. Box 9300
> Portland, ME 04104-9300
> USA
>
>
> Tel: (207) 228-8389
> Fax: (207) 780-5607
> Email: aaboueissa at usm.maine.edu
> aboueiss at yahoo.com
>
> http://www.usm.maine.edu/~aaboueissa/
>
>
> Office: 301C Payson Smith
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
>
More information about the R-sig-teaching
mailing list