I am having a hard time in Stats understanding some basic rules of probability and set-theory, namely $P(A|B)$, $P(A\ \textrm{and}\ B)$ and $P(A\ \textrm{or}\ B)$ where $A$ and $B$ depend on each other. I use Mathematica all the time through my school, and I love to program in my free-time (sometimes writing small scripts for Mathematica).

I can understand confusing subjects that deal with logic when they are in a programming language syntax, so I thought I could understand what's going on better if I had a written syntax to look at. Will anyone bother to help?

  • $\begingroup$ Are you asking for an example on how to deal with Bayes theorem in Mathematica? $\endgroup$
    – Stefan
    Jul 18 '13 at 8:02
  • $\begingroup$ @Stefan In a way, yes. Basically, what would the code for those three basic rules look like in Mathematica's programming language so that I can play around with it to understand it better? $\endgroup$
    – jocopa3
    Jul 18 '13 at 8:12

The Wolfram Demonstration Project has 13 submissions that use Bayes Theorem: See here

enter image description here

More specifically:

Probability Of Being Sick After Having Tested Positive For A Disease

Bayes's Theorem And Inverse Probability

Total Probability And Bayes's Theorem

All of these will have downloadable code to help you learn this.

Good luck.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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