Dear All I have 2 value assume 2.4 and 2.9 and mean = 2 variance = with n = 10 I want to find probability = 2.4 and 2.9. How I can do this. Many Thanks. Jumlong -- Jumlong Vongprasert Assist, Prof. Institute of Research and Development Ubon Ratchathani Rajabhat University Ubon Ratchathani THAILAND 34000 [[alternative HTML version deleted]]
Dear Jumlong, Perhaps look at ?pnorm I am not really certain what you want to do. Are 2.4 and 2.9 scores or means? Is the variance 2? What distribution are you assuming these values come from? If you explain a bit more what you are after, we can help more. Cheers, Josh On Fri, Nov 5, 2010 at 9:47 PM, Jumlong Vongprasert <jumlong.ubru at gmail.com> wrote:> Dear All > I have 2 value assume 2.4 and 2.9 and mean = 2 variance = with n = 10 > I want to find probability = 2.4 and 2.9. > How I can do this. > Many Thanks. > Jumlong > > -- > Jumlong Vongprasert Assist, Prof. > Institute of Research and Development > Ubon Ratchathani Rajabhat University > Ubon Ratchathani > THAILAND > 34000 > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
Hi Jumlong, Is this what you want?> pnorm(q = c(2.4, 2.9), mean = 2, sd = 1)[1] 0.6554217 0.8159399 HTH, Josh On Fri, Nov 5, 2010 at 9:57 PM, Jumlong Vongprasert <jumlong.ubru at gmail.com> wrote:> Dear Joshua Wiley > 2.4 and 2.9 are score, and mean = 2 variance = 1?n = 10 with normal > distribution. > Many Thanks. > Jumlong > > 2010/11/6 Joshua Wiley <jwiley.psych at gmail.com> >> >> Dear Jumlong, >> >> Perhaps look at ?pnorm >> >> I am not really certain what you want to do. ?Are 2.4 and 2.9 scores >> or means? ?Is the variance 2? ?What distribution are you assuming >> these values come from? ?If you explain a bit more what you are after, >> we can help more. >> >> Cheers, >> >> Josh >> >> On Fri, Nov 5, 2010 at 9:47 PM, Jumlong Vongprasert >> <jumlong.ubru at gmail.com> wrote: >> > Dear All >> > I have 2 value assume 2.4 and 2.9 and mean = 2 variance = with n = 10 >> > I want to find probability = 2.4 and 2.9. >> > How I can do this. >> > Many Thanks. >> > Jumlong >> > >> > -- >> > Jumlong Vongprasert Assist, Prof. >> > Institute of Research and Development >> > Ubon Ratchathani Rajabhat University >> > Ubon Ratchathani >> > THAILAND >> > 34000 >> > >> > ? ? ? ?[[alternative HTML version deleted]] >> > >> > ______________________________________________ >> > R-help at 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. >> > >> >> >> >> -- >> Joshua Wiley >> Ph.D. Student, Health Psychology >> University of California, Los Angeles >> http://www.joshuawiley.com/ > > > > -- > Jumlong Vongprasert Assist, Prof. > Institute of Research and Development > Ubon Ratchathani Rajabhat University > Ubon Ratchathani > THAILAND > 34000 >-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
Dear All I have some problem with calculate probability. Assume I have data with normal distribution with mean = 5 sd = 2. I want to approximate probability = 2.4. I used pnorm(2.4, 5, 2) - pnorm(2.4, 5, 2, lower.tail = FLASE), correct or not. Many Thanks Jumlong
On 06-Nov-10 11:16:28, Jumlong Vongprasert wrote:> Dear All > I have some problem with calculate probability. > Assume I have data with normal distribution with mean = 5 sd = 2. > I want to approximate probability = 2.4. > I used pnorm(2.4, 5, 2) - pnorm(2.4, 5, 2, lower.tail = FLASE), > correct or not. > Many Thanks > Jumlong[A] Not correct because "FLASE" should be "FALSE". [B] Not correct because a) pnorm(2.4, 5, 2) is the probability that a value from a Normal distribution with mean 5 will be less than 2.4, and this is less than 1/2 (since 2.4 is less than the mean). b) pnorm(2.4, 5, 2, lower.tail = FALSE) is the probability that such a value will be greater than 2.4, and this is greater than 1/2 (for the same reason. c) The difference will therefore be (< 1/2) - (> 1/2) which will be less than 0, so cannot be a probability. [C] Not correct because a value sampled from a Normal distribution (which is a continuous distribution) has probability 0 of being exactly equal to any given value (e.g. 2.4); so I think your question does not express what you want to know. One possibility which could make your question realistic is that the value "2.4" that you are interested in is a value sampled from Normal(mean=5, sd=2) **that has been rounded to 1 decimal place** and so could have been any value between 2.35 and 2.45; in that case it makes sense to ask what is the probability of a value in this range from Normal(mean=5, sd=2). This would be pnorm(2.45, 5, 2) - pnorm(2.35, 5, 2) = 0.008569045 Of course, the degree of rounding may be different -- for example rounding to *even* values of the first decimal place, i.e. to values ... , 2.0, 2.2, 2.4, 2.6, 2.8, ... in which case the event whose probability you want is that the sampled value is between 2.3 and 2.5, whose probability is pnorm(2.5, 5, 2) - pnorm(2.3, 5, 2) = 0.01714178 Since the question you are really interested in cannot be identified from what you have asked (see examples above), you should try to make your question clear and definite! Hoping this helps, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.harding at wlandres.net> Fax-to-email: +44 (0)870 094 0861 Date: 06-Nov-10 Time: 12:06:17 ------------------------------ XFMail ------------------------------