Re: Re: solving a system of two equations
- To: mathgroup at smc.vnet.net
- Subject: [mg102025] Re: [mg102018] Re: solving a system of two equations
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Mon, 27 Jul 2009 05:53:29 -0400 (EDT)
- References: <200907260757.DAA19100@smc.vnet.net>
- Reply-to: drmajorbob at bigfoot.com
Correct. My "solution" was OK algebraically, but spurious, since BetaDistribution takes two POSITIVE parameters. Here are the extreme values of Mean and Variance (not all of them achievable, hence the messages I've turned off): Clear[a, b] {m, v} = Through[{Mean, Variance}@BetaDistribution[a, b]]; f = #1[{#2, a > 0, b > 0}, {a, b}] &; Off[Minimize::"natt", Maximize::"wksol"] Transpose@Outer[f, {Minimize, Maximize}, {m, v}] {{{0, {a -> Indeterminate, b -> ComplexInfinity}}, {1, {a -> ComplexInfinity, b -> Indeterminate}}}, {{0, {a -> 0, b -> Indeterminate}}, {1/ 4, {a -> 0, b -> 0}}}} That is, Mean varies from 0 to 1, and Variance varies from 0 to 1/4. Of the four limits, only one (variance == 1/4) is achievable. The other interval end-points are open. Bobby On Sun, 26 Jul 2009 02:57:46 -0500, Bill Rowe <readnews at sbcglobal.net> wrote: > On 7/25/09 at 4:17 AM, perfreem at gmail.com (per) wrote: > >> i am trying to find two parameters a, b of the Beta distribution >> that make its mean equal to some given constant m and its variance >> equal to some given constant v. this reduces to solving a system of >> two equations based on the mean/variance definitions of the beta >> distribution: > >> a/(a+b) = m a*b/((a + b)^2 (a + b + 1)) = v > >> i want to solve this equation for a and b. i tried to solve this in >> mathematica, as follows (for m = .5, v = 1): > >> Solve[{a/(a + b) == .5, a*b/((a + b)^2 (a + b + 1)) == 2}, a] But it >> returns: {} > > You are aware you are solving for v = 2 rather than v = 1 as you > wrote right? > > But be that as it may, there is no solution for either value. > The variance for any distribution is the expected value of (x - > Mean[x])^2. For the standard beta distribution, x ranges from 0 > to 1. So, for all acceptable values of x, x - Mean[x] will be > between -1 and 1. That is the variance of a standard beta > distribution will be less than 1. > > Note, for the particular case where the mean of a beta > distribution is 0.5, the distribution is symmetrical and the > parameters are equal. In that case the variance reduces to > 1/(4(2a+1)) which clearly is less than 1 for all a>0. > > -- DrMajorBob at bigfoot.com
- References:
- Re: solving a system of two equations
- From: Bill Rowe <readnews@sbcglobal.net>
- Re: solving a system of two equations