> Date: Tue, 1 Feb 2011 12:10:31 -0800
> From: nord...@dshs.wa.gov
> To: r-help@r-project.org
> Subject: Re: [R] p value for joint probability
>
> > -----Original Message-----
> > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of moleps
> > Sent: Tuesday, February 01, 2011 11:32 AM
> > To: Peter Ehlers
> > Cc: r-help@r-project.org
> > Subject: Re: [R] p value for joint probability
> >
> >
> > My terminology is probably way off. I´ll try again in plain english.
> >
> > I´d like to generate a scatter plot of r1 & r2 and color code each
> > pair according to the probability of observing the pair given that the
> > two samples (r1 & r2) are drawn from two independent normal
> > distributions.
> >
> > rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5))
> >
> > with(rr,plot(r1,r2))
> >
> > Best,
> > //M
>>
>
> And the answer is the same as Peter gave below. The theoretical probability
> of a specific pair of numbers occurring in your example is zero. So, I will
> ask Peter's question differently (although his question was a good one). What
> is your interest in doing these plots? What are you trying to understand? Are
> you just trying to learn how do this "joint probability" plot for use on data
> where there is a non-zero probability of pairs of numbers occurring? Equiring
> minds would like to know. :-)
Empirically of course, the probability is not zero since it did happen :) As
with the folks
surprised about floating point equality compares, there is some integration
over the
quantization interval. So in fact the probabiliyt of measuring what was
measured is
an integral over the floating point difference between the two closest numbers.
Presumably
however you want an answer unrelated to the fp properties.
>
> Dan
>
> Daniel J. Nordlund
> Washington State Department of Social and Health Services
> Planning, Performance, and Accountability
> Research and Data Analysis Division
> Olympia, WA 98504-5204
>
______________________________________________
R-help@r-project.org mailing list
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.