Binomial distribution

1. Nov 22, 2006

sycamorex

Hi,

Can anyone explain binomial distribution to me. I tried wikipedia and some googling, but I just do not understand much of it. I don't come from
maths background, I am more like an IT person. I need to write a short
program calculating binomial distributions, however, first I need to understand the idea behind it to write the program.

Can you expain it to me in simple terms, or refer to any link providing
a SIMPLE explanation. As I said before, the explanation on wikipidia
doesn't tell me much. Possibly some exercises on it. When do we use it?

Thank you very much in advance
sycamorex

2. Nov 22, 2006

A keyword which you should find useful while doing some further google-ing: a Bernoulli trial.

Edit: ok ok, I'll google it up from my head in the meantime.

Let there be m independent experiments such that the probability of an outcome A is equal in every of the experiments and is given with P(A) = p. This is a Bernoulli trial. (Example: coin tossing - head or tail.)

Further on, a random variable X = 'the number of times an event A occured in m experiments in a Bernoulli trial with the probability p' is called a Bernoulli or binomial random variable.

This is a brief explanation.

Last edited: Nov 22, 2006
3. Nov 23, 2006

sycamorex

thank you
Ok, so if i want to write the computer I would have to have:

probability space - an array of possible outcomes e.g {1,2} tossing a coing, {1,2,3,4,5,6} for rolling a dice.
then I need to state the probability of a particular outcome to happen
e.g P(C)= 0.5 (coins), P(D)=1/6 (dice)

and how can I calculate the binomial distribution of it?

4. Nov 23, 2006

You have to apply the probability density function of the binomial distribution, which is given with:
$$f(x) = P(X=k) = \binom{m}{k}p^k (1-p)^{m-k}$$,

where m is the number of experiments and k the number of a specific outcome of the experiment.

5. Nov 24, 2006

sycamorex

Thanks I think I cracked it:)
so can you confirm it, please
If we take tossing a coin as our experiment
P=0.5
number of trials =4

k=0, probability density function:0.0625
k=1, pdf: 0.25
k=2, pdf: 0.375
k=3, pdf: 0.25
k=4, pdf: 0.0625

is that correct?
thanks

6. Nov 24, 2006

murshid_islam

yeah you are correct, sycamorex

7. Nov 24, 2006

sycamorex

thanks, now I will be able to write the program:)