# Probability, binomial?

I'm working on a programming assignment and am completely stuck on a problem involving statistics :/.

In my problem, I am dealing with a hypothetical situation where I am walking outdoors and am surrounded by mosquitoes. For any given meter I walk, there are 100 mosquitoes, each with a probability p of biting me. I am supposed to determine how many mosquito bites I get after a certain distance walked and create a histogram. (Should my histogram be # of bites per distance walked?)

I figured I could use binomial distribution to figure out the probability of being bitten per meter $$\frac{n!}{x!(n-x)!}p^{x}(1-p)^{n-x}$$ where n is the total number of mosquitoes, x is the how many mosquitoes bite me per given meter (determined using my program) and p is the chance of being bit by a single mosquito. Should the number of meters come into play in the binomial distribution? I'm lost. I'm not even sure I'm using this correctly though and don't really know where to go from there. I have never taken any stat classes, so I could really use the help. Thank you so much!

• Cross Validated is a stackexchange site for stats. Apr 9, 2015 at 7:05

In walking a distance $x$ you will be bitten an average of $\lambda=100\times p\times x$ times. The actual number of times you are bitten would usually be a random variable with a Poisson distribution $\mbox{Pois}(\lambda)$ and so the probability of being bitten $k$ times is: $$p(k)=f_{Poisson}(k;\lambda)=\frac{\lambda^ke^{-\lambda}}{k!}$$ Where $f_{Poisson}(k;\lambda)$ denotes the probability mass function of the Poisson distribution with mean $\lambda$.
When asked to plot the histogram it should be a histogram showing $p(k)$ agains $k$.