[Date Index]
[Thread Index]
[Author Index]
Re: Strange Probability function behavior (Bug?)
On 11/15/2011 4:50 AM, Brentt wrote:
> Oh wait, never mind, it works now that I've restarted the program. Not sure
> what happened. But its fine now.
>
> On Mon, Nov 14, 2011 at 5:43 AM, Bob Hanlon<hanlonr357 at gmail.com> wrote:
>
>> Works here. Probability is new in version 8. Are you using version 8?
>>
>> $Version
>>
>> "8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"
>>
>> Probability[x == 3, Distributed[x, PoissonDistribution[m]]]
>>
>> ((1/6)*m^3)/E^m
>>
>>
>> Bob Hanlon
>>
>>
>> On Mon, Nov 14, 2011 at 7:07 AM, Brentt<brenttnewman at gmail.com> wrote:
>>> Hello,
>>>
>>> If I go to the Probability function documentation, and evaluate a
>>> probability function in the documentation notebook, the probability
>>> function works as would be expected, for example:
>>>
>>> In[0]:= Probability[x == 3, Distributed[x, PoissonDistribution[m]]]
>>>> Out[0]= 1/6 E^-m m^3
>>>>
>>> So far so good.
>>>
>>> But strangely, if I open up a new notebook and copy and paste the exact
>>> expression from above into it, I get this
>>>
>>> In[0]:= Probability[x == 3, Distributed[x, PoissonDistribution[m]]]
>>>> Out[0]:= Probability[True, 3 \[Distributed] PoissonDistribution[m]]
>>>>
>>> What could possibly be happening here? Is this a bug?
>>>
What you saw originally would happen if x had been assigned the value of
3 earlier in the session.
In[1]:= x = 3;
In[2]:= Probability[x == 3, Distributed[x, PoissonDistribution[m]]]
Out[2]= Probability[True, 3 \[Distributed] PoissonDistribution[m]]
One way this could easily happen (aside from a direct assignment like
above) is if you had accidentally evaluated with a single = sign, e.g.
Probability[x = 3, Distributed[x, PoissonDistribution[m]]]
then corrected the syntax and re-evaluated.
Darren Glosemeyer
Wolfram Research
Prev by Date:
**Re: Solve for parameters of a truncated normal distribution**
Next by Date:
**Re: How to find more solutions for an periodical equation with infinity solutions**
Previous by thread:
**Re: Strange Probability function behavior (Bug?)**
Next by thread:
**Manipulate graphs with graphics**
| |