Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: random variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120461] Re: random variables
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sun, 24 Jul 2011 03:19:14 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201107232352.TAA08648@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

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 at 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 at yahoo.com




  • References:
  • Prev by Date: NDSolve in matrix form
  • Next by Date: Re: From Reduce to List
  • Previous by thread: random variables
  • Next by thread: TransformedDistribution -- odd problem