Ok, so before anything else, I have no idea what I'm doing. Not in mathematica and maybe not in the maths either.

My question is basically if I can contour-plot f=BinomialDistribution[100, p], with the distribution f (in colour) along the y-axis, and the chance p for the distribution along the x-axis. I would give some MWE if I got anything to work, but sadly I don't. I did create an image of how I somewhat expect it to look.

Example of my proposed image

So what I can do is explain the rationale. I'm working on grain count samples, which are usually expressed in concentrations (5% Garnet, 10% Zircon, etc.). One usually counts 100 grains, so every grain turns into 1%. This of course introduces a representation error, due to the difference in actually present concentration and measured concentration. As far as I know, the Binomial Distribution like BinomialDistribution[100, 0.2] gives you the chance of finding the correct concentration (f=0.1 at 20%) as well as the chances for near integers. The distribution obviously peaks at a low percentage and spreads out greatest along the middle 50%.

Thus along the X-axis I have the 'actual concentration', and along the y-axis I have the '(chance of) measured concentration'. given by BinomialDistribution[100, x/100]

I hope you understand my question :)


Maybe this is what you want?

 Table[PDF[BinomialDistribution[100, x/100], y], {y, 0, 100}, {x, 0, 100}], 
   DataReversed -> True, FrameTicks -> Automatic]

enter image description here

  • $\begingroup$ Cool, yes, great! I didn't know about the PDF function. Thank you very much! :) $\endgroup$ – Erik May 8 '14 at 20:13
  • $\begingroup$ Didn't know about PDF? It shows up in the very first example in the documentation for BinomialDistribution :) $\endgroup$ – Rahul May 8 '14 at 22:19

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.