Re: RandomArray from user defined distribution?
- To: mathgroup at smc.vnet.net
- Subject: [mg73344] Re: RandomArray from user defined distribution?
- From: "Ray Koopman" <koopman at sfu.ca>
- Date: Tue, 13 Feb 2007 06:57:32 -0500 (EST)
- References: <eqpdv5$eip$1@smc.vnet.net>
On Feb 12, 2:02 am, rob <r... at piovere.com> wrote: > I'd like to use the RandomArray to produce some data from > what I think is a Poisson distribution in t > P[t] = a^2 t Exp[-a*t] where a is mean, sigma. > > I see one can use RandomArray to produce sample data from a > lot of continuous distributions but the Poisson isn't among > them (it's only available in the discrete form). > > I've made a bunch of crippled attempts to force my P[t] to > put out examples but have failed. Any suggestions? Thanks. P[t] is the pdf of a continuous random variable on {0,Infinity}, but its mean is 2/a and its variance is 2/a^2. In[1]:= P[t] = a^2 t Exp[-a*t]; In[2]:= Assuming[a > 0, Integrate[P[t],{t,0,Infinity}]] Out[2]= 1 In[3]:= Assuming[a > 0, Integrate[t P[t],{t,0,Infinity}]] Out[3]= 2/a In[4]:= Assuming[a > 0, Integrate[(t-2/a)^2 P[t],{t,0,Infinity}]] Out[4]= 2/a^2 It's certainly not a Poisson distribution. What are you trying to do?