Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.4K Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Invalid Input error and a result from NExpectation

Posted 1 year ago

Can someone please tell me why I am getting an invalid input message for the first computation (even though it returns a value) and not the second.

POSTED BY: Paul Studtmann
5 Replies
POSTED BY: Michael Rogers
Statistics`NExpectationDump`MultivariateProductParsing //
 GeneralUtilities`PrintDefinitions

seems to indicate that ProductDistribution is supported only if Conditioned is absent.

I think Gianluca's example has a different issue in that x>1 is not in the domain of the distribution.

POSTED BY: Michael Rogers

I'm not sure I understand your comment. In my examples, the input that generates the error has a condition: r>p>(1/2t^2+1/2s^2)^(1/2). The input that does not generate the error has a simpler condition: r>(1/2t^2+1/2s^2)^(1/2). Why would adding the extra clause in the first condition generate an error?

POSTED BY: Paul Studtmann

Thank you for your reply. The same thing happens with the example I gave. If the input is Expectation rather than NExpectation, there is no 'invalid input' error. In both cases, the output is the same. So, I am not concerned about the output. But, I am wondering why there is the error message for the NExpectation input.

POSTED BY: Paul Studtmann

Here is a simpler input with the same problem:

NExpectation[1 \[Conditioned] x > 1,
 {x, y} \[Distributed] DirichletDistribution[{1, 3, 4}]]

while the following works fine:

Expectation[1 \[Conditioned] x > 1,
 {x, y} \[Distributed] DirichletDistribution[{1, 3, 4}]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard