Archive for Bayes theorem

improper priors, incorporated

Posted in Books, Statistics, University life with tags , , , , , , , , on January 11, 2012 by xi'an

“If a statistical procedure is to be judged by a criterion such as a conventional loss function (…) we should not expect optimal results from a probabilistic theory that demands multiple observations and multiple parameters.” P. McCullagh & H. Han

Peter McCullagh and Han Han have just published in the Annals of Statistics a paper on Bayes’ theorem for improper mixtures. This is a fascinating piece of work, even though some parts do elude me… The authors indeed propose a framework based on Kingman’s Poisson point processes that allow to include (countable) improper priors in a coherent probabilistic framework. This framework requires the definition of a test set A in the sampling space, the observations being then the events Y∩ A, Y being an infinite random set when the prior is infinite. It is therefore complicated to perceive this representation in a genuine Bayesian framework, i.e. for a single observation, corresponding to a single parameter value. In that sense it seems closer to the original empirical Bayes, à la Robbins.

“An improper mixture is designed for a generic class of problems, not necessarily related to one another scientifically, but all having the same mathematical structure.” P. McCullagh & H. Han

The paper thus misses in my opinion a clear link with the design of improper priors. And it does not offer a resolution of the  improper prior Bayes factor conundrum. However, it provides a perfectly valid environment for working with improper priors. For instance, the final section on the marginalisation “paradoxes” is illuminating in this respect as it does not demand  using a limit of proper priors.

[stack] overloaded, crossed and invalidated

Posted in Books, Kids, Statistics, University life with tags , , , , , , on November 21, 2011 by xi'an

For the few past days, I have been monitoring Cross Validated, a forum on statistics that is part of StackExchange (“a fast-growing network of 71 question and answer sites on diverse topics from software programming to cooking to photography and gaming“…) for questions of interest, but I think (hope?) I will stop there my involvement. First, I fear this type of forum is too addictive (at least for me, and I already have my share of web-related addictions, witness this very blog!). Of course, Cross Validated is an interesting site for questions related with statistics and machine learning, with a great LATEX interface that allows to type math formulas in a natural way; however I also find the exercise rather frustrating and to some extend futile, which is another reason why I do not wish pursuing the experience any further. For one thing, some of the questions found there are of the “please do my homework for me” type and I am plagued with enough emails of this sort (connected with my own exercises) to look for further hassle. They are however easy to spot and thus eliminate. For another, I suspect a majority of questions, while honest and deep enough, are often asked at the spur of the moment, i.e. without a preliminary search on a paper or online source, like Wikipedia or a textbook. E.g., a question about Bayes theorem that brought decent answers but not further than the Wikipedia entry on the topic. At one level, I would like to give in to temptation and to answer questions I feel I have a valid and informative answer. However, it does not seem like an efficient use of my time (read my books instead!) And also I am not completely convinced this fundamentally helps the persons who ask the questions in the first place. What may lie at the bottom of my unease with being involved in such forums is the sad fact that most questioners want answers without getting through the necessary steps of learning the bases and the background theory surrounding the question. While not being a teacher at heart, this approach gets against my views on learning (“Give a man a fish, &tc.”). Observations towards this view are that (a) many questioners are “one-shot” occurrences, i.e. are never seen again on the forum and (b) such questioners often fail to acknowledge answers that are not posted immediately, i.e. are not really interested in the debate surrounding the question they asked in the first place, only in someone solving their problem for them…

Anyway, this post is my very personal opinion on why I should not get involved with Q&A sites: it does not aim at criticising people asking or answering questions on Cross Validated, quite clearly, as some questions may lead to interesting research developments and as some answers are well-though, helpful, and informative. Just not my ballpark!

LaTeX search

Posted in Statistics, University life with tags , on June 30, 2011 by xi'an

When visiting Springer site, I spotted a window advertising LaTeX Search. This is a webpage that produces (Springer published) papers involving the LaTeX code entered by the user. The idea is nice. However, given the number of ways one can type a LaTeX command, (and the limited number of LaTeX “snippets” available, a modest 3 millions…), I wonder about the final utility of this (free) product! For instance, when typing

[sourcecode language=”latex” gutter=”false”]
\pi(\theta|x_1,\ldots,x_n) \propto \pi(\theta)
[/sourcecode]

I could not find any relevant document. Even

[sourcecode language=”latex” gutter=”false”]
\pi(\theta|x_1,\ldots,x_n) \propto \pi(\theta)
[/sourcecode]

did not show an exact equivalence. Even though Bayes’ formula eventually showed up

[sourcecode language=”latex” gutter=”false”]
\pi(\theta|{\mathbf{x}}) = \frac{\pi(\theta)L(\theta|{\mathbf{x}})}
{\int_{\Uptheta} \pi(\theta)L(\theta|{\mathbf{x}}) \hbox{d}\theta}
\propto \pi(\theta)L(\theta|{\mathbf{x}})
[/sourcecode]

I therefore remain unconvinced by the relevance of the concept! Unless one looks for a very specific and concise object.

Re-reading An Essay towards solving a Problem in the Doctrine of Chances

Posted in Books, Statistics with tags , , , on May 2, 2011 by xi'an

“We ought to estimate the chance that the probability for the happening of an event perfectly unknown, should lie between any two named degrees of probability, antecedently to any experiment made about it.” Letter of R. Price to J. Canton, Nov. 10, 1763

On a lazy and sunny Sunday afternoon, I re-read Thomas Bayes’ 1763 Essay. (It is available in LaTex, courtesy of Peter Lee.) The major part of the Essay is actually written by Richard Price, Bayes’ contribution being from page 376 to page 399. Most of the introduction by Price (in the form of a letter to John Canton) rephrases Bayes’ findings, but he stresses that Bayes set a “sure foundation for all our reasonings concerning past facts”. In the spirit of the time, he cannot prevent from relating the uncovering of “fixt laws according to which events happened” to the “existence of the Deity”. He also perceives Bayes’ rule as “solving the converse problem” from De Moivre’s Laws of Chances. At last, he stresses that, although chance should relate to past events, while probability relates to future events, the distinction should not impact conditional probability.

“Given the number of times in which an unknown event has happened and failed; Required the chance that the probability of its happening in a single trial lies somewhere between any two degrees of probability that can be named.” Th. Bayes

The Essay itself consists in (a) a “brief demonstration of the general laws of chance”, (b) the derivation of Bayes’ posterior distribution for the uniform-binomial problem, (c) the computation of the posterior probability of an arbitrary interval. The first part is a rewording of De Moivre’s Laws of Chance, in particular recalling the definition of a conditional probability. Maybe the definition of the probability is worth quoting

5. The probability of any event is the ratio between the value at which an expectation depending on the happening of the event ought to be computed and the value of the thing expected upon it’s happening.

because it actually defines a probability as a by-product of the expected number of occurrences within a binomial experiment. (There is therefore nothing frequentist in this definition!) The main part (and the huge novelty) in the Essay is the derivation of the Beta posterior. Surprisingly, the setup is introduced very abruptly (in that nowhere before were those balls mentioned!):

Postulate. 1. Suppose the square table or plane ABCD to be so made and levelled, that if either of the balls o or W be thrown upon it, there shall be the same probability that it re{\st}s upon any one equal part of the plane as another, and that it must necessarily rest somewhere upon it.

and then the derivation starts with a two-page derivation that the prior (uniform) cdf is the uniform cdf.  The next result is Prop. 8 [388] that gives the joint probability that the binomial probability is between f and b and that the binomial experiment gives x=p:

the probability the point o should fall between f and b, any two points named in the line AB, and withall that the event M should happen p times and fail q in p+q trials, is the ratio of fghikmb, the part of the figure BghikmA intercepted between the perpendiculars fg, bm raised upon the line AB, to CA the square upon AB.

where the curve is y=xp(1-x)q.

The next proposition is then Bayes’ rule, still expressed in terms of surface ratio as above,

The same things supposed, I guess that the probability of the event M lies somewhere between 0 and the ratio of Ab to AB, my chance to be in the right is the ratio of Abm to AiB.

but clearly set within the Beta(p+1,q+1) distribution [in modern terms]. Bayes then inserts a scholium where he tries to justify the use of the uniform prior, however I do not see the validity of the reasoning since he seems to argue in favour of a uniform distribution on the marginal distribution of the binomial experiment:

I have no reason to think that, in a certain number of trials, it should rather happen any one possible number of times than another.

The last part of the Essay per se is about deriving a closed form formula for the Beta integral, a feat achieved in Rule I. [399]

P(X\le \theta\le x|p,q) = (p+q){p+q\choose p}\left\{\frac{X^{p+1}}{p+1}-q\frac{X^{p+2}}{p+2}+\cdots\right.

\left.\cdots-\frac{x^{p+1}}{p+1}+q\frac{x^{p+2}}{p+2}-\cdots\right\}

in slightly more modern notations. The 18 remaining pages are written by Richard Price, who first reproduces Bayes’ approximations to the above integral with improvements of his own, then illustrates the performances of such approximations in specific cases, with the astounding fact that the probability covered by the approximation is centred at the MLE:

P(|\theta-p/(p+q)|\le z)

and not at the Bayes posterior mean. This could be extrapolated as one of the earliest confidence sets, except of course that the probability is over the parameter space. I note that Price also derives [409-410] as a consequence of Bayes’ calculations what is now know as Laplace’s succession rule…! Besides the derivation of the posterior distribution itself, which must be a considerable feat for the time, the attention to computational issues is highly commendable, as it would become a constant theme of Bayesian studies for centuries!!!

Thomas Bayes, 250 years later

Posted in R, Statistics, University life with tags , , , on April 21, 2011 by xi'an

A link on R-bloggers signaled a series of blogs and videos by IBM Netezza about Thomas Bayes and the consequences of his theorem. Which made me realise this was indeed the 250th anniversary of his death, and that maybe we (as a collective, incl. ISBA) should have done something on April 17th (or is it April 7th?)… Before the Revolution Analytics announcement, only this post in Dutch by Tom Heskes appeared to celebrate the event. I am not sure one should draw major consequences from this, but if any, this means that the Bayesian community has sufficiently grown in strength and maturity to stop focusing on a single point of its long history. And maybe celebrations will be more widespread for the 250th anniversaty of the publication of An essay towards solving a problem in the doctrine of chances on Dec. 23, 1763.