Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Well, as a final (I hope!) clarification: It is not the case that "the bigger cube does not exists (because the Q is the reference space)". It does exist! Simply, the probability of the random point being in the bigger cube, and NOT in the cube Q, is 0. Hence "the cumulative probability of reachin

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi Ted, Thanks for the explanation. I am convinced at least more than average by Eric and your answer. But still have some shadows of confusion that is definitely because I have forgotten some fundamentals in probabilities. In your cube example, the cumulative probability of reaching a point out

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Sorry -- stupid typos in my definition below! See at ===*** below. On Tue, 2018-10-23 at 11:41 +0100, Ted Harding wrote: Before the ticket finally enters the waste bin, I think it is necessary to explicitly explain what is meant by the "domain" of a random variable. This is not (though in special

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Ted Harding
Before the ticket finally enters the waste bin, I think it is necessary to explicitly explain what is meant by the "domain" of a random variable. This is not (though in special cases could be) the space of possible values of the random variable. Definition of (real-valued) Random Variable (RV): Le

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Yes, now it makes more sense. Okay, I think that I am convinced and we can close this ticket. Thanks Eric. Regards, Hamed. On Tue, 23 Oct 2018 at 10:42, Eric Berger wrote: > Hi Hamed, > That reference is sloppy. Try looking at > https://en.wikipedia.org/wiki/Cumulative_distribution_functi

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Eric Berger
Hi Hamed, That reference is sloppy. Try looking at https://en.wikipedia.org/wiki/Cumulative_distribution_function and in particular the first example which deals with a Unif[0,1] r.v. Best, Eric On Tue, Oct 23, 2018 at 12:35 PM Hamed Ha wrote: > Hi Eric, > > Thank you for your reply. > > I sho

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi Eric, Thank you for your reply. I should say that your justification makes sense to me. However, I am in doubt that CDF defines by the Pr(x <= X) for all X? that is the domain of RV is totally ignored in the definition. It makes a conflict between the formula and the theoretical definition.

Re: [R] Ignoring the domain of RV in punif()

2018-10-23 Thread Eric Berger
Hi Hamed, I disagree with your criticism. For a random variable X X: D - - - > R its CDF F is defined by F: R - - - > [0,1] F(z) = Prob(X <= z) The fact that you wrote a convenient formula for the CDF F(z) = (z-a)/(b-a) a <= z <= b in a particular range for z is your decision, and as you noted th

[R] Ignoring the domain of RV in punif()

2018-10-23 Thread Hamed Ha
Hi All, I recently discovered an interesting issue with the punif() function. Let X~Uiform[a,b] then the CDF is defined by F(x)=(x-a)/(b-a) for (a<= x<= b). The important fact here is the domain of the random variable X. Having said that, R returns CDF for any value in the real domain. I underst