MathGroup Archive 2005

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

Search the Archive

Re: Solution from Reduce as boundaries for Distribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60027] Re: Solution from Reduce as boundaries for Distribution
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sun, 28 Aug 2005 23:14:38 -0400 (EDT)
  • References: <dernnq$s1o$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

kristoph schrieb:
> I started useing Mathematica just recently and can't solve the
> following problem:
> I'de like to solve the following equation for 0<=x<=1:
> 15/16+x-Mod[15/16+x,1/2]==1 I did this with Reduce[expr.&&0<=x<=1,x].
> Solution: 1/16<=x<9/16. So far so good.
> For further calculations I need the boundaries of the above solution in
> an UniformDistribution, therefore UniformDistribution[1/16,9/16]. I
> have absoulutly no idea how to do this. Thanks very much for help.
> 
Hi Kristoph,

the solution is represented as a list internally. The boundaries are the
first and the last element of this list:

In[1]:=
lsg = List @@ Reduce[15/16 + x - Mod[15/16 + x, 1/2] == 1 &&
    0 <= x <= 1, x]
Out[1]=
{1/16, LessEqual, x, Less, 9/16}
In[2]:=
gleichverteilt = UniformDistribution @@ lsg[[{1, -1}]]
Out[2]=
UniformDistribution[1/16, 9/16]
In[3]:=
Plot[Evaluate[CDF[gleichverteilt, x]], {x, 0, 1},
    Ticks -> {Range[16]/16, Range[4]/4}];

good luck,
  Peter

-- 
Peter Pein, Berlin
GnuPG Key ID: 0xA34C5A82
http://people.freenet.de/Peter_Berlin/


  • Prev by Date: Re: help working with functions
  • Next by Date: Re: RasterGraphics[]
  • Previous by thread: Re: Solution from Reduce as boundaries for Distribution
  • Next by thread: Re: Solution from Reduce as boundaries for Distribution