0
$\begingroup$

I'd like to check the sign of a symbolic expression conditional on some predefined assumptions. More specifically, first, I want to assume that the mean and variance of a normally distributed random variable is between 0 and 1. Then I want to show that the probability that this variable is between two values (that are also between 0 and 1) is positive. Here is my code:

$Assumptions = {1>kmax>kmin>0,1>m>0,1>sigma>0};
FullSimplify@Positive[CDF[NormalDistribution[m,sigma],kmax]-CDF[NormalDistribution[m,sigma],kmin]]

which returns

enter image description here

Can someone help me understand why Mathematica does not see that this expression is strictly positive? Thanks in advance!

$\endgroup$
2
  • $\begingroup$ I think you are going about this the wrong way. The question is not really a Mathematica question, nor a Normal distribution question. If $X$ is a continuous random variable with cdf $F(x)$, then by definition $F(x)$ is a non-decreasing function of $x$, and strictly increasing over any positive density. Finally, $P(a<X<b) = F(b)-F(a)$ for $b>a$... and that covers you for everything. $\endgroup$
    – wolfies
    Commented Sep 28, 2023 at 14:10
  • $\begingroup$ Thank you. I am aware of the mathematical proof you provide. However, my end goal is to use Mathematica to conveniently check the signs of other more complex symbolic expressions I have at hand. The fact that Mathematica fails to recognize the positivity of the simple expression above means that it can't help me assess other expressions either. $\endgroup$
    – elifcansu
    Commented Sep 29, 2023 at 10:48

1 Answer 1

0
$\begingroup$

The documentation clearly says that Positive works only for numbers. This explains the output obtained by you. That you want can be done as follows.

FunctionMonotonicity[CDF[NormalDistribution[m, sigma], x], x,StrictInequalities -> True]

1

$\endgroup$
4
  • $\begingroup$ Thank you. I didn't realize that, especially because it seems to work fine in simpler cases such as checking whether kmax-kmin is positive. Do you have any suggestions on how to assess the sign of symbolic expressions with Mathematica in general? $\endgroup$
    – elifcansu
    Commented Sep 27, 2023 at 13:28
  • $\begingroup$ @elifcansu: Please formulate a more concrete question. What a question, such an answer. $\endgroup$
    – user64494
    Commented Sep 27, 2023 at 15:59
  • $\begingroup$ I mean to ask whether there is a function that performs what Positive[] does but for symbolic expressions. Or if not, is it possible to construct one? $\endgroup$
    – elifcansu
    Commented Sep 27, 2023 at 16:38
  • $\begingroup$ @elifcansu: I don't know such a function in Mathematica. FindInstance may do the job in some cases That's all. $\endgroup$
    – user64494
    Commented Sep 27, 2023 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.