Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

ForAll statement being ignored

Posted 9 years ago

Help much appreciated. I'm trying to specify a PDF for the results of a set of experiments. Each experiment's result is Poisson distributed with a constant expectation ('factor'). The results themselves are given by score[g] for experiment number g.

This defines the set of probability distributions:

probresult[g_, factor_] := PDF[PoissonDistribution[factor], score[g]]

Now, if I ask for the expression for a specific result (say, g=3), I get a conditional expression that expresses the Poisson distribution for score[3]>=0, and 0 otherwise - which is fine. If I want to get rid of the conditional, I can add the statement


and it then returns the unconditional distribution because we've assumed it's weakly positive. But if instead I add the stronger assumption


we are back to the conditional output. I can't work out how to get it to infer score[3]>=0 from ForAll[x, score[x]>=0]

What am I doing wrong? Many thanks in advance.

POSTED BY: Nick Hare
3 Replies
Posted 9 years ago

Aha - cracked it with:

probresult[g_, factor_] := 
 Simplify[PDF[PoissonDistribution[factor], score[g]], 
  Assumptions -> score[g] >= 0]

Very many thanks!

POSTED BY: Nick Hare
Posted 9 years ago

Many thanks - that's exactly what I'm trying to do. With an arbitrary x elements, how can I declare the assumption that score[x]>0 for every element?

POSTED BY: Nick Hare

Are you trying to do Assumptions -> ForAll[x, score[x] >= 0] ? I don't think ForAll works as an assumption. It's used inside Reduce or Resolve.

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract