Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 :)

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Maybe this is what you want?

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

enter image description here

share|improve this answer
    
Cool, yes, great! I didn't know about the PDF function. Thank you very much! :) –  Erik May 8 at 20:13
    
Didn't know about PDF? It shows up in the very first example in the documentation for BinomialDistribution :) –  Rahul Narain May 8 at 22:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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