19

To the downvoters: this isn't a question about mathematics, it's a question about the programming language Mathematica.

One of the prime characteristics of Mathematica is that it can deal with many things symbolically. But if you come to think about it, many of the symbolic features are actually only halfway symbolic.

Take vectors for instance. We can have a symbolic vector like {x,y,z}, do a matrix multiplication with a matrix full of symbols and end up with a symbolic result and so we might consider that symbolic vector algebra. But we all know that, right out of the box, Mathematica does not allow you to say that a symbol x is a vector and that given a matrix A, A . x is a vector too. That's a higher level of abstraction, one that Mathematica (currently) does not very well deal with.

Similarly, Mathematica knows how to find the 5th derivative of a function that's defined in terms of nothing than symbols, but it's not well geared towards finding the r th derivative (see the "How to find a function's rth derivative when r is symbolic in Mathematica?" question).

Furthermore, Mathematica has extensive Boolean algebra capabilities, some stone age old, but many recently obtained in version 7. In version 8 we got Probability and friends (such as Conditioned) which allows us to reason with probabilities of random variables with given distributions. It's a really magnificent addition which helps me a lot in familiarizing myself with this domain, and I enjoy working with it tremendously. However,...

I was discussing with a colleague certain rules of probabilistic logic like the familiar

enter image description here

i.e., the conditional probability of event/state/outcome C given event/state/outcome A is true.

Specifically, we were looking at this one:

enter image description here

and although I had spoken highly about Mathematica's Probability just before I realized that I wouldn't know how to solve this right away with Mathematica. Again, just as with abstract vectors and matrices, and symbolic derivatives, this seems to be an abstraction level too high. Or is it? My question is:

Could you find a way to find the truth or falsehood in the above and similar equations using a Mathematica program?

4

2 に答える 2

4

>> Mathematica では、シンボル x がベクトルであるとは言えません

確かにそうです...とにかく十分に近い...それはRealsのコレクションです。やりたいことに応じて、仮定または条件付けと呼ばれます。

Refine[Sqrt[x]*Sqrt[y]]

X と Y は任意の記号であると想定しているため、上記は洗練されていませんが、範囲を狭めると、次の結果が得られます。

Assuming[ x > 0 && y > 0, Refine[Sqrt[x]*Sqrt[y]]]

Element[x,Reals^2](2次元実数ベクトル)、おそらく Mathematica 9. :-)


この問題に関しては:

>> Mathematica プログラムを使って、上記の方程式と類似の方程式の真偽を見つける方法を見つけられますか?

ベイズの定理への象徴的なアプローチを確認するには、この質問に対する私の回答 (最初の回答) を参照してください: https://stackoverflow.com/questions/8378336/how-do-you-work-out-conditional-probabilities-in-mathematica -出来ますか

于 2011-12-12T19:54:06.587 に答える
2

これをちらっと見て、のドキュメントから例を見つけましたCondition

In[1]:= c = x^2 < 30; a = x > 1;

ここでフォーマットして申し訳ありません...

In[2]:= Probability[c \[Conditioned] a, x \[Distributed] PoissonDistribution[2]] == 
Probability[c && a, x \[Distributed] PoissonDistribution[2]] / Probability[a, x \[Distributed] PoissonDistribution[2]]

Trueあなたが与えた最初の例の一般的ではないバージョンに評価され、対応します。

時間があれば、今夜遅くにこれを再訪します。

于 2011-11-28T03:23:04.213 に答える