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

MathGroup Archive 2013

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

Search the Archive

Re: (amusement) surprising result from PossibleZeroQ

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130715] Re: (amusement) surprising result from PossibleZeroQ
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Mon, 6 May 2013 02:25:53 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130504071901.7FD916A19@smc.vnet.net>

Assuming[
 {0 <= q <= 1},
 Quantile[ParetoDistribution[k, a], q] //
  Simplify]


Piecewise[{{k/(1 - q)^a^(-1), q < 1}},
   Infinity]



Piecewise[{{
    Quantile[ParetoDistribution[k, a], q],
    0 <= q <= 1}}, Indeterminate] //
 PiecewiseExpand


Piecewise[{{Indeterminate,
       q > 1 || q < 0}, {k/(1 - q)^a^(-1),
       Inequality[0, LessEqual, q, Less,
         1]}}, Infinity]



Bob Hanlon




On Sat, May 4, 2013 at 3:19 AM, Peter Pein <petsie at dordos.net> wrote:

> Dear group,
>
>  playing around with distributions, I experienced one of these "that's
> strange!"-moments.
>
>  Take the quantile of a Pareto distribution
>
> test = Quantile[ParetoDistribution[k, a], q];
> InputForm@test
>
> ConditionalExpression[Piecewise[{{k/(1 - q)^a^(-1), q < 1}}, Infinity],
>  0 <= q <= 1]
>
> I thought the nesting of ConditionalExpression and Piecewise could
> simplify and tried every possible combination of 4 functions; to no avail:
>
> Block[{f = {Refine, Simplify, FullSimplify, PiecewiseExpand}},
>  Length[funcs =
>    Composition @@@ Flatten[Tuples[f, #] & /@ Range[Length@f], 1]]
>  ]
> 340
>
> DeleteCases[Through[funcs[test]], test]
> {}
>
> My expectation has been sth. like
>
> test2 = Piecewise[{{k/(1 - q)^(1/a), 0 <= q < 1},
>                    {Infinity, q == 1}},
>                   Indeterminate];
>
> and
>
> FullSimplify[test2 - test] // InputForm
> ConditionalExpression[0, 0 <= q <= 1]
>
> looks good. But compare this to
>
> PossibleZeroQ[test2 - test] // InputForm
> ConditionalExpression[False, 0 <= q <= 1]
>
> I decided to classify that as "funny" :)
>
> MemberQ[Attributes@PossibleZeroQ, Listable]
> True
>
>
> Have fun with or without Mathematica!
>
>   Peter
>
>



  • Prev by Date: Re: very basic RecurrenceTable puzzle
  • Next by Date: Text based interface: $PreRead does not work as manual says.
  • Previous by thread: (amusement) surprising result from PossibleZeroQ
  • Next by thread: Re: Farewell to a friend