Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Experimentian with Bayesian statistics

  • To: mathgroup at
  • Subject: [mg45418] Re: Experimentian with Bayesian statistics
  • From: poujadej at (Jean-Claude Poujade)
  • Date: Wed, 7 Jan 2004 01:09:09 -0500 (EST)
  • References: <bt8o98$c1u$>
  • Sender: owner-wri-mathgroup at

NA <nospam at> wrote in message news:<bt8o98$c1u$1 at>...
> Hi,
> I'm trying to learn some basic Bayesian statistics with Mathematica but I'm
> having trouble building up the probability formulae that I need.
> I tried to define
> depPr[x_,y_] := (Pr[x] depPr[y,x]) / Pr[y]
> but I don't even get an Out result  (I thought it would have at least
> redisplayed it with numerator over denominator)
> (I assumed by the way that I needed a different name for the function   Pr{x
> | y} vs the simple  Pr{x})
> If I replace the ':=' with '=', then I just get a recursion error.
This is an example of what you could do to prevent recursion :

   p[a_[r_Integer(* event number *), n_Integer(* number of events *)],b_]:=
   p[b,a[r,n]]p[a[r,n]] / Sum[p[b,a[i,n]]p[a[i,n]],{i,1,n}];

Numeric example :

   p[a[1,2]] = 1/10;
   p[a[2,2]] = 9/10;
   p[b,a[1,2]] = 1/3;
   p[b,a[2,2]] = 1/60;






  • Prev by Date: Quantum algebra package
  • Next by Date: Re: Mathematica exports curves in pieces to Illustrator
  • Previous by thread: Experimentian with Bayesian statistics
  • Next by thread: Interpolating function