Re: A nasty 2x2 system of equations?
- To: mathgroup at smc.vnet.net
- Subject: [mg54121] Re: A nasty 2x2 system of equations?
- From: "Carl K. Woll" <carlw at u.washington.edu>
- Date: Fri, 11 Feb 2005 03:33:33 -0500 (EST)
- Organization: University of Washington
- References: <cuf559$glj$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Bruce, I don't understand why Solve doesn't work here, but as a workaround you could try: Solve[{Mean[Z] == m, Variance[Z] == v}, {a3, b3}] /. {m -> c*Mean[X] + (1 - c)*Mean[Y], v -> c^2*Variance[X] + (1 - c)^2*Variance[Y]} Carl Woll "Bruce Colletti" <vze269bv at verizon.net> wrote in message news:cuf559$glj$1 at smc.vnet.net... > Re Mathematica 5.1. > > The code below keeps running without getting an answer. Is the code > flawed or is this a really nasty system of 2-equations in 2-unknowns? > > Here's background: X and Y are independent beta-distributed random > variables and Z is a convex combination of X and Y, i.e., Z = cX + (1 - > c)Y. > > Although Z need not be beta-distributed, let's pretend it is and in turn, > solve for its parms (a3 and b3) in terms of c and the known parms of X and > Y. > > Thanks. > > Bruce > > ------------- > > > X = BetaDistribution[a1, b1]; > Y = BetaDistribution[a2, b2]; > Z = BetaDistribution[a3, b3]; > > Solve[{Mean[Z] == c*Mean[X] + (1 - c)*Mean[Y], > Variance[Z] == c^2*Variance[X] + (1 - c)^2*Variance[Y]}, {a3, b3}] >