Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3943 > unrolled thread
| Started by | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| First post | 2011-07-24 07:20 +0000 |
| Last post | 2011-07-24 07:20 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: random variables DrMajorBob <btreat1@austin.rr.com> - 2011-07-24 07:20 +0000
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-07-24 07:20 +0000 |
| Subject | Re: random variables |
| Message-ID | <j0gh41$bcs$1@smc.vnet.net> |
U=ChiSquareDistribution[n-1];
twoU=TransformedDistribution[2*u,u\[Distributed]U];
Through[{Mean,Variance,PDF}@twoU]
{2 (-1+n),8 (-1+n),Function[\[FormalX],\[Piecewise] (2^(1-n)
\[FormalX]^(-1+1/2 (-1+n)) E^(-\[FormalX]/4))/Gamma[1/2
(-1+n)] \[FormalX]>0
0 True
,Listable]}
Bobby
On Sat, 23 Jul 2011 18:52:50 -0500, paulvonhippel at yahoo
<paulvonhippel@yahoo.com> wrote:
> I would like to define a symbol representing a random variable, and
> then use that symbol in other expressions. It's not clear to me how to
> do that. For example, when I type the following input --
>
> U = ChiSquareDistribution[n - 1]
> V = 2*U
> W = 3*U
> Mean[V]
> Mean[W]
>
> -- I do not get the mean of the random variables V and W. I know I can
> get the desired answer by typing:
>
> V = TransformedDistribution[2*U,
> U \[Distributed] ChiSquareDistribution[n - 1]]
> W = TransformedDistribution[3*U,
> U \[Distributed] ChiSquareDistribution[n - 1]]
> Mean[V]
> Mean[W]
>
> But that requires me to redefine the distribution of U every time I
> need it.
>
> Is there a way to define U just once?
>
--
DrMajorBob@yahoo.com
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web