This is an interview question that I found online:

The probability of observing a squirrel in an hour is 64%. What is the probability of observing at least one squirrel in half an hour assuming that there is an infinite number of squirrels and the the arrival of squirrels is iid?

I thought about using the poison process to model it where $\lambda$=.64, so

$prob(observing\ >=1\ squirrel\ in\ half\ an\ hour)=1 - e^{\lambda/2}$

But the poisson process is meant to model rare events and in this case there is an infinite number of squirrels in this case.

What is the right distribution to model this process?

  • 6
    $\begingroup$ The Poisson process is not meant to model rare events, just events for which the time between events has an Exponential distribution. The interview question as stated is a poor one, because it depends upon the unstated assumption of Exponential interarrival times, but if squirrels "clump" together (true) or arrive at different rates at different times of day (true) or the time until the next squirrel arrival is independent of the time since the last squirrel arrival (unlikely to be true)... $\endgroup$ – jbowman Jul 9 '18 at 23:51
  • $\begingroup$ @jbowman I edited the question to include the condition that the arrival of squirrels is iid $\endgroup$ – Amazonian Jul 10 '18 at 3:43
  • $\begingroup$ If you have an infinite number of squirrels with i.i.d. arrival times, then the probability of observing a squirrel in any finite time period is always 0 or 1, depending on if the the probability of any one squirrel arriving is either exactly zero on non-zero. In particular it cannot be 0.64. You can have a non-iid infinite set of squirrels where, say, each is half as likely to arrive as the previous one because the geometric series 1/2, 1/4, 1/8, ... converges. math.stackexchange.com/questions/664193/… $\endgroup$ – olooney Jul 11 '18 at 2:04
  • $\begingroup$ I guess I should clarify that the point of my above comment is that you probably don't really mean "an infinite number of squirrels." Insofar as the question can be answered, you're on the right track with the Poisson distribution. $\endgroup$ – olooney Jul 11 '18 at 2:08

There's no simple "right" distribution for the process because the actual process is not simple. There's dependence between events and variation in rate over time (as jbowman mentioned already in comments), but the question doesn't provide information on those aspects of the process.

For an interview question the "right" distribution to choose is not what is correct for the process but whichever distribution the interviewer thinks is the right one.

I'd guess the intent is actually to assume a Poisson process (since that allows a numerical answer). I wouldn't be able to give that answer without pointing out why it was wrong, however. I'd attempt to explain the directions in which the answer might move as other - possibly more realistic - assumptions were used. There's not enough information to give a good numerical answer though.

Of course they might actually be looking for three tiers of answer (those with no idea how to proceed, those who can recognize they're trying to set up a Poisson process model, and those who can see that and explain why that's wrong).

[I'd harbour some reservations about working at a place where they thought that just using the Poisson would be a good answer. A question like that at least potentially reveals as much about the employer (or the quality of the work done there) as it does about the employee. If I were interviewing for more than one job, other things being equal something like that could be enough for me to lean towards choosing someplace else.]

  • 1
    $\begingroup$ In my experience, open-ended, ambiguous or incomplete questions are sometimes asked in interviews just to see whether the interviewee is thoughtful. For example, if the interviewee immediately and blindly jumps to the wrong conclusion, that's not a great sign. But if the interviewee lays out some alternative options and their relative merits and demerits, that's more thoughtful. $\endgroup$ – Sycorax Jul 10 '18 at 1:56
  • $\begingroup$ @Glen_b under what conditions would a poisson model be reasonable in this case? and under what conditions would a poisson model not be reasonable? $\endgroup$ – Amazonian Jul 10 '18 at 7:20
  • $\begingroup$ You'd need (to a fair degree of approximation) the usual assumptions for a Poisson process; independence and constant rate. You can consider a variety of alternatives (degree and form of dependence, and degree of variation in rate) to investigate were the approximation starts to fall outside your definition of "reasonable". $\endgroup$ – Glen_b Jul 10 '18 at 12:15
  • 2
    $\begingroup$ That last paragraph is worthy of its own internet post; my personal experience accepting a job at a firm that thought that dice-rolling questions were good ones to ask of experienced data scientist applicants ("what is the probability you roll a 7 before you roll a 5 when rolling two dice?") supports the idea that the questions say a lot about the company. That was many years ago, and I'm more experienced now... $\endgroup$ – jbowman Jul 10 '18 at 16:05

It seems like an open-ended question. Given just the stated conditions, the probability could be anything from 0 to 100%. You could have i.i.d. arrival times, where all they always arrive just before the full hour (e.g. they know the feeder gets filled at the full hour, they always get scared away by the church bells that ring on the full hour etc.).

On the other hand, if you clarify the mechanism by which they are believed to arrive (e.g. equally likely to arrive in any time interval during the hour = Poisson process, in addition to the already given i.i.d. condition that means that all squirrels have the same probability in every time interval and one being there does not scare away or attract the others), it should be easy to answer. Presumably the intent is for the interviewed person to find out the necessary information and to proceed from there.


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.