From: Jan Danielsson <jan.danielsson_at_gmail.com>

Date: Fri 10 Feb 2006 - 06:02:33 EST

Date: Fri 10 Feb 2006 - 06:02:33 EST

Hello,

Given a probability function: p(x) = 12 / (25(x+1)) , x=0, 1, 2, 3 we generate the following values:

C1 C2

0 0.48 1 0.24 2 0.16 3 0.12

Now, I'm supposed to create 50 random values using this table. In MiniTab, I simply selected Calc -> Random Data -> Discrete, and selected the columns, and it created 50 random values in a new column.[1]

How do I do the same thing in R?

[1] You may be wondering why I'm telling you this. Well, it's because if I were in your shoes, I'd think "Oh, someone wants me to solve his homework.". I have already solved it using MiniTab, but I want to be able to use R instead (since I prefer NetBSD).

-- Kind Regards, Jan Danielsson Te audire non possum. Musa sapientum fixa est in aure.Received on Fri Feb 10 07:35:56 2006

______________________________________________ R-help@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

- application/pgp-signature attachment: OpenPGP digital signature

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:42:27 EST
*