bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

Data Interview Question

Estimating Daily Ad Exposure

bugfree Icon

Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem

Solution & Explanation

Problem Breakdown

We are tasked with determining the probability that a user sees more than 10 ads in a day on a social networking platform. Given:

  • Users engage with 100 posts daily.
  • Each post has a 10% probability of being an ad.

This scenario can be modeled using a Binomial Distribution since each post can either be an ad or not, and the probability of a post being an ad is constant.

Parameters of the Binomial Distribution

  • Number of trials (n): 100 (total posts viewed)
  • Probability of success (p): 0.10 (probability a post is an ad)

The random variable X, representing the number of ads seen, is distributed as: XBinomial(n=100,p=0.1)X \sim \text{Binomial}(n=100, p=0.1)

Expected Value and Variance

  • Mean (μ): np=100×0.1=10np = 100 \times 0.1 = 10
  • Variance (σ²): np(1p)=100×0.1×0.9=9np(1-p) = 100 \times 0.1 \times 0.9 = 9

Probability Calculation

We need to find the probability that a user sees more than 10 ads: P(X>10)=1P(X10)P(X > 10) = 1 - P(X \leq 10)

Using the cumulative distribution function (CDF) of the Binomial distribution: P(X10)=i=010(100i)(0.1)i(0.9)100iP(X \leq 10) = \sum_{i=0}^{10} \binom{100}{i} (0.1)^i (0.9)^{100-i}

Normal Approximation

Given that the number of trials is large and the probability of success is small, we can use the Normal approximation to the Binomial distribution. The conditions for using the normal approximation (np ≥ 5 and n(1-p) ≥ 5) are satisfied.

  • Standard deviation (σ): np(1p)=9=3\sqrt{np(1-p)} = \sqrt{9} = 3

Using the Normal distribution: XN(μ=10,σ2=9)X \sim N(\mu=10, \sigma^2=9)

To find P(X>10)P(X > 10), we apply the continuity correction: P(X>10)=P(X11)P(X>10.5)P(X > 10) = P(X \geq 11) \approx P(X > 10.5)

Convert to the standard normal distribution (Z): Z=XμσZ = \frac{X - \mu}{\sigma} Z=10.5103=0.1667Z = \frac{10.5 - 10}{3} = 0.1667

Using the standard normal CDF: P(Z>0.1667)=1P(Z0.1667)P(Z > 0.1667) = 1 - P(Z \leq 0.1667)

From standard normal distribution tables or computational tools: P(Z0.1667)0.5662P(Z \leq 0.1667) \approx 0.5662 P(Z>0.1667)=10.5662=0.4338P(Z > 0.1667) = 1 - 0.5662 = 0.4338

Conclusion

Thus, the probability that a user sees more than 10 ads in a day is approximately 43.38%. This result aligns with the approximation from the binomial distribution using normal CDF and continuity correction.