DecodeAI
← Question Bank

Mathematics & Statistics

Probability

Interview questions on Probability.

106 questions

General

Q4. Write the expression of probability of $A$ given that $B$ has already occurred.

Sign in to bookmark

General

Q6. What does it mean for two variables to be independent?

Sign in to bookmark

General

Q7. Given two random variables $X$ and $Y$. We have the values$ P(X|Y)$and$ P(Y)$for all values of$ X $and$ Y $. How would you calculate$ P(X)$?

Sign in to bookmark

General

Q8. You know that your colleague Jason has two children and one of them is a boy. What’s the probability that Jason has two sons?

Sign in to bookmark

General

Q9. Consider a room of $n$ people. Suppose that their birthdays are randomly distributed among $365$ days of the year. Find the expression for the probability of at-least two people have birthday on same day vs $n$. Find the probability when$ n=2$.

Sign in to bookmark

General

Q10. Given two events $A$ and $B$ in probability space $H$, which occur with probabilities$ P(A)$and$ P(B)$, respectively:

Sign in to bookmark
  1. Define the conditional probability of AA given BB. Mind singular cases.
  2. Annotate each part of the conditional probability formulae.
  3. Draw an instance of Venn diagram, depicting the intersection of the events AA and BB. Assume thatAB=H A \cup B = H.

General

Q11. Assume you manage an unreliable file storage system that crashed 5 times in the last year, each crash happens independently.

Sign in to bookmark
  1. What's the probability that it will crash in the next month?
  2. What's the probability that it will crash at any given moment?

General

Q12. Say you built a classifier to predict the outcome of football matches. In the past, it's made 10 wrong predictions out of 100. Assume all predictions are made independently, what's the probability that the next 20 predictions are all correct?

Sign in to bookmark

General

Q16. Show the relationship between the prior, posterior and likelihood probabilities.

Sign in to bookmark

General

Q17. In a Bayesian context, if a first experiment is conducted, and then another experiment is followed, what does the posterior become for the next experiment?

Sign in to bookmark

General

Q18. Suppose there are three closed doors and a car has been placed behind one of the door at random. There are two goats behind the other two doors. Now you pick a door 1 but the admin knows where the car is and open the door 2 to reveal a goat(admin will always open the door with a goat). Now he offers you to stay at the same chosen door or switch between closed doors i.e door 1 and door 2. Should you switch the door to maximize chances of getting car?

Sign in to bookmark

General

Q19. There are only two electronic chip manufacturers: $A$ and $B$, both manufacture the same amount of chips. A makes defective chips with a probability of $30%$, while B makes defective chips with a probability of $70%$.

Sign in to bookmark
  1. If you randomly pick a chip from the store, what is the probability that it is defective?
  2. Suppose you now get two chips coming from the same company, but you don’t know which one. When you test the first chip, it appears to be functioning. What is the probability that the second electronic chip is also good?

General

Q20. There’s a rare disease that only 1 in 10000 people get. Scientists have developed a test to diagnose the disease with the false positive rate and false negative rate of 1%.

Sign in to bookmark
  1. Given a person is diagnosed positive, what’s the probability that this person actually has the disease?
  2. What’s the probability that a person has the disease if two independent tests both come back positive?

General

Q21. A dating site allows users to select $10$ out of $50$ adjectives to describe themselves. Two users are said to match if they share at least $5$ adjectives. If Jack and Jin randomly pick adjectives, what is the probability that they match?

Sign in to bookmark

General

Q22. Consider a person A whose sex we don’t know. We know that for the general human height, there are two distributions: the height of males follows $h_m=N(μ_m,σ^{2}_m)$ and the height of females follows $h_j=N(μ_j,σ^{2}_j)$ . Derive a probability density function to describe A’s height.

Sign in to bookmark

General

Q23. There are three weather apps, each the probability of being wrong $\frac{1}{3}$ of the time. What’s the probability that it will be foggy in San Francisco tomorrow if all the apps predict that it’s going to be foggy in San Francisco tomorrow and during this time of the year, San Francisco is foggy $50%$ of the time?

Sign in to bookmark

General

Q24. Given n samples from a uniform distribution $[0,d]$. How do you estimate$ d$? (Also known as the German tank problem)

Sign in to bookmark

General

Q25. You’re part of a class. How big the class has to be for the probability of at least a person sharing the same birthday with you is greater than $50%$?

Sign in to bookmark

General

Q26. You decide to fly to Vegas for a weekend. You pick a table that doesn’t have a bet limit, and for each game, you have the probability $p$ of winning, which doubles your bet, and $1−p$ of losing your bet. Assume that you have unlimited money (e.g. you bought Bitcoin when it was 10 cents), is there a betting strategy that has a guaranteed positive payout, regardless of the value of $p$?

Sign in to bookmark

General

Q27. In national health research in the US, the results show that the top 3 cities with the lowest rate of kidney failure are cities with populations under $5,000$. Doctors originally thought that there must be something special about small town diets, but when they looked at the top 3 cities with the highest rate of kidney failure, they are also very small cities. What might be a probabilistic explanation for this phenomenon?

Sign in to bookmark

General

Q28. Bayesian inference amalgamates data information in the likelihood function with known prior information. This is done by conditioning the prior on the likelihood using the Bayes formulae. Assume two events A and B in probability space $H $, which occur with probabilities$ P(A)$and$ P(B)$, respectively. Given that$ A \cup B = H$, state the Bayes formulae for this case, interpret its components and annotate them.

Sign in to bookmark

General

Q29. In an experiment conducted in the field of particle physics (Fig. 3.2), a certain particle may be in two distinct equally probable quantum states: integer spin or half-integer spin. It is well-known that particles with integer spin are bosons, while particles with half-integer spin are fermions.

Sign in to bookmark

General

Q30. During pregnancy, the Placenta Chorion Test is commonly used for the diagnosis of hereditary diseases (Fig. 3.3). The test has a probability of $0.95$ of being correct whether or not a hereditary disease is present.

Sign in to bookmark

General

Q31. The Dercum disease is an extremely rare disorder of multiple painful tissue growths.

Sign in to bookmark

In a population in which the ratio of females to males is equal, 5% of females and 0.25% of males have the Dercum disease (Fig. 3.4).

General

Q32. There are numerous fraudulent binary options websites scattered around the Internet, and for every site that shuts down, new ones are sprouted like mushrooms. A fraudulent AI based stock-market prediction algorithm utilized at the New York Stock Exchange, (Fig. 3.6) can correctly predict if a certain binary option shifts states from 0 to 1 or the other way around, with $85\%$ certainty.

Sign in to bookmark

General

Q33. In an experiment conducted by a hedge fund to determine if monkeys (Fig. 3.6) can

Sign in to bookmark

outperform humans in selecting better stock market portfolios, 0.05 of humans and 1 out of 15 monkeys could correctly predict stock market trends correctly.

General

Q34. During the cold war, the U.S.A developed a speech to text (STT) algorithm that could theoretically detect the hidden dialects of Russian sleeper agents. These agents (Fig. 3.7), were trained to speak English in Russia and subsequently sent to the US to gather intelligence. The FBI was able to apprehend ten such hidden Russian spies and accused them of being "sleeper" agents.

Sign in to bookmark

General

Q35. During World War II, forces on both sides of the war relied on encrypted communications. The main encryption scheme used by the German military was an Enigma machine, which was employed extensively by Nazi Germany. Statistically, the Enigma machine sent the symbols X and Z Fig. (3.8) according to the following probabilities:

Sign in to bookmark

P(X)=29P(Z)=79P(X) = \frac{2}{9} \\ \\ P(Z) = \frac{7}{9}

General

Q36. In context of random variables define the following terms:

Sign in to bookmark
  • Distributions
  • Expectations
  • Variance
  • PMFs and CDFs
  • Support

General

Q40. Can a Probability Density Function (PDF) be bounded or unbounded?

Sign in to bookmark

General

Q41. Write the expression of variance of a random variable?

Sign in to bookmark

General

Q42. What’s the difference between multivariate distribution and multimodal distribution?

Sign in to bookmark

General

Q43. What do you mean by log probability? Explain why do we need it?

Sign in to bookmark

General

Q44. How would you turn a probabilistic model into a deterministic model?

Sign in to bookmark

General

Q45. What is a moment of function? Explain the meanings of the zeroth to fourth moments.

Sign in to bookmark

General

Q48. Suppose $X$ is a random variable following bernoulli distribution. Express the following for $X$.

Sign in to bookmark
  • Support
  • PMF Equation
  • Smooth PMF
  • Expectation
  • Variance

General

Q49. Suppose $X$ is a random variable following binomial distribution. Express the following for $X$.

Sign in to bookmark
  • Support
  • PMF Equation
  • Expectation
  • Variance

General

Q50. The binomial distribution is often used to model the probability that $k$ out of a group of $n$ objects bare a specific characteristic. Define what is meant by a binomial random variable $X$.

Sign in to bookmark

General

Q51. What does the following shorthand stand for?

Sign in to bookmark

XBinomial(n,p)X ∼ \text{Binomial}(n, p)

General

Q52. Find the probability mass function (PMF) of the following random variable:

Sign in to bookmark

XBinomial(n,p)X ∼ Binomial(n, p)

General

Q53. Define the terms likelihood and log-likelihood of a discrete random variable X given a fixed parameter of interest $\gamma$. Give a practical example of such scenario and derive its likelihood and log-likelihood.

Sign in to bookmark

General

Q54. Define the terms likelihood and log-likelihood of a discrete random variable X given a fixed parameter of interest $\gamma$. Give a practical example of such scenario and derive its likelihood and log-likelihood. (Part 2)

Sign in to bookmark

General

Q55. Given a fair coin, what’s the number of flips you have to do to get two consecutive heads?

Sign in to bookmark

General

Q56. Derive the expectation and variance of a the binomial random variable $X ∼ Binomial(n, p)$ in terms of $p$ and $n$.

Sign in to bookmark

General

Q57. What is poisson distribution? Define following in context of it.

Sign in to bookmark
  • Notation
  • Parameters
  • Support
  • PMF
  • Expectation
  • Variance

General

Q58. What are the main assumption for poisson distribution?

Sign in to bookmark

General

Q60. Proton therapy (PT) is a widely adopted form of treatment for many types of cancer.

Sign in to bookmark

A PT device which was not properly calibrated is used to treat a patient with pancreatic cancer (Fig. 3.1). As a result, a PT beam randomly shoots 200200 particles independently and correctly hits cancerous cells with a probability of 0.10.1.

General

Q61. The 2014 west African Ebola epidemic has become the largest and fastest spreading outbreak of the disease in modern history with a death tool far exceeding all past outbreaks combined. Ebola (named after the Ebola River in Zaire) first emerged in 1976 in Sudan and Zaire and infected over 284 people with a mortality rate of 53%.

Sign in to bookmark

General

Q62. Let y be the number of successes in 5 independent trials, where the probability of success is θ in each trial. Suppose your prior distribution for θ is as follows: $P(θ = 1/2) = 0.25, P (θ = 1/6) = 0.5, and P (θ = 1/4) = 0.25$.

Sign in to bookmark
  1. Derive the posterior distribution p(θy)p(θ|y) after observing y.
  2. Derive the prior predictive distribution for y.

General

Q63. Prove that the family of beta distributions is conjugate to a binomial likelihood, so that if a prior is in that family then so is the posterior. That is, show that:

Sign in to bookmark

xBer(γ),γB(α,β)γxB(α,β)x ∼ Ber(γ), γ ∼ B(α,β) ⇒ γ|x ∼ B(α′,β′) For instance, for h heads and t tails, the posterior is: B(h+α,t+β)B(h + α,t + β)

General

Q64. A recently published paper presents a new layer for a new Bayesian neural network (BNN). The layer behaves as follows. During the feed-forward operation, each of the hidden neurons $H_n , n ∈ 1, 2$ in the neural network (Fig. 3.10) may, or may not fire independently of each other according to a known prior distribution.

Sign in to bookmark

General

Q65. Your colleague, a veteran of the Deep Learning industry, comes up with an idea for for a BNN layer entitled OnOffLayer. He suggests that each neuron will stay on (the other state is off) following the distribution $f(x) = e^{−x} \ for \ x > 0 \ and \ f(x) = 0 \ otherwise (Fig. 3.11)$.$ X$ indicates the time in seconds the neuron stays on. In a BNN, 200 such neurons are activated independently in said OnOffLayer. The OnOffLayer is set to off (e.g. not active) only if at least 150 of the neurons are shut down. Find the probability that the OnOffLayer will be active for at least 20 seconds without being shut down.

Sign in to bookmark

General

Q66. A Dropout layer(Fig. 3.12) is commonly used to regularize a neural network model by randomly equating several outputs (the crossed-out hidden node H) to 0.

Sign in to bookmark

General

Q67. A new data scientist in your team, who was formerly a Quantum Physicist, suggests the following procedure for a Dropout layer entitled Quantum Drop which is based on Quantum principles and the Maxwell Boltzmann distribution. In the Maxwell-Boltzmann distribution, the likelihood of finding a particle with a particular velocity v is provided by:

Sign in to bookmark

n(v)dv=4πNV(m2πkT)32v2emv22kTdvn(v)dv = \frac{4\pi N}{V}(\frac{m}{2\pi kT})^{\frac{3}{2}}v^2e^{-\frac{mv^2}{2kT}}dv

General

Q68. List down important continuous probability distributions?

Sign in to bookmark

General

Q69. List down important continuous probability distributions? (Part 2)

Sign in to bookmark

General

Q70. Under what conditions can we say that a random variable is drawn from a uniform distribution?

Sign in to bookmark

General

Q71. Define the following in context of uniform probability distribution?

Sign in to bookmark
  • Support
  • PDF Expression
  • Expectations
  • Variance

General

Q72. Given a uniform random variable X in the range of [0,1] inclusively. What’s the probability that X=0.5 ?

Sign in to bookmark

General

Q73. In context of exponential distribution define following terms?

Sign in to bookmark
  • Notation
  • Parameters
  • Support
  • Pdf expression
  • Cdf expression
  • Expectation
  • Variance

General

Q74. Based on historical data from the USGS, earthquakes of magnitude 8.0+ happen in a certain location at a rate of 0.002 per year. Earthquakes are known to occur via a poisson process. What is the probability of a major earthquake in the next 4 years?

Sign in to bookmark

General

Q75. Can the values of PDF be greater than 1? If so, how do we interpret PDF?

Sign in to bookmark

General

Q76. What is the expression for the probability density function (PDF) of a normal distribution, and what are the expectation and variance of this distribution?

Sign in to bookmark

General

Q77. If $X$ is a normal such that $X ~ N(\mu, \sigma^2)$ and $Y$ is a linear transform of $X$ such that $Y = aX + b$, what will be pdf of$ Y$?

Sign in to bookmark

General

Q78. What is the expression of CDF of normal distribution?

Sign in to bookmark

General

Q79. What are the properties of standard normal distribution?

Sign in to bookmark

General

Q80. You’re drawing from a random variable that is normally distributed, $X∼N(0,1)$, once per day. What is the expected number of days that it takes to draw a value that’s higher than $0.5$?

Sign in to bookmark

General

Q81. In what condition we can approximate the binomial distribution into normal or poisson distribution?

Sign in to bookmark

General

Q82. It’s a common practice to assume an unknown variable to be of the normal distribution. Why is that?

Sign in to bookmark

General

Q83. Is it possible to transform non-normal variables into normal variables? How?

Sign in to bookmark

General

Q84. Define the term prior distribution of a likelihood parameter $\gamma$ in the continuous case.

Sign in to bookmark

General

Q85. In this question, you are going to derive the Fisher information function for several distributions. Given a probability density function (PDF) $f(X|γ)$, you are provided with the following definitions:

Sign in to bookmark
  1. The natural logarithm of the PDF lnf(Xγ)=Φ(Xγ)lnf(X|γ) = Φ(X|γ).
  2. The first partial derivative Φ(Xγ)Φ′(X|γ).
  3. The second partial derivative Φ′′(Xγ)Φ′′(X|γ).
  4. The Fisher Information for a continuous random variable: I(γ)=Eγ[Φ(Xγ)]I(γ) = −Eγ[Φ′(X|γ)] Find the Fisher Information I(γ)I(γ) for the following distributions:
  5. The Bernoulli Distribution XB(1,γ)X ∼ B(1, γ).
  6. The Poisson Distribution XPoiss(θ)X ∼ Poiss(θ).

General

Q86. 1. Define the term posterior distribution.

Sign in to bookmark
  1. Define the term prior predictive distribution.

Correlation and Covariance

Q88. What is the co-variance of two independent random variables?

Sign in to bookmark

Correlation and Covariance

Q89. Are independence and zero covariance the same? Give a counterexample if not.

Sign in to bookmark

Correlation and Covariance

Q90. Suppose we have a random variable X supported on $[0,1]$ from which we can draw samples. How can we come up with an unbiased estimate of the median of X?

Sign in to bookmark

Correlation and Covariance

Q91. Define variance and co-variance. What is the difference between them?

Sign in to bookmark

Correlation and Covariance

Q92. How does sign of covariance decides the direction of relationship between two random variables?

Sign in to bookmark

Correlation and Covariance

Q93. Suppose you are conducting an experiment for studying behavior of two random variables $X$ and $Y$ and you found out $Cov(X, Y) = 100$. Does it mean they are strongly correlated?

Sign in to bookmark

Correlation and Covariance

Q95. Prove that $Cov(X, Y) = E(XY) - E(X)E(Y)$.

Sign in to bookmark

Correlation and Covariance

Q96. What will be the value of $Cov(X, c) where$ X $is a random variable and$ c$ is a constant value?

Sign in to bookmark
  1. Cov(X)Cov(X)2.cCov(X) cCov(X)3.c2Cov(X) c^2Cov(X)4. 00

Correlation and Covariance

Q97. Write down some properties of Covariance.

Sign in to bookmark

Correlation and Covariance

Q98. Define correlation. How is it related to Covariance?

Sign in to bookmark

Correlation and Covariance

Q99. What are the benefits of using correlation over covariance?

Sign in to bookmark

Correlation and Covariance

Q100. If you are analyzing two random variables $X$ and $Y$ and find that the correlation $\rho(X, Y) = 0$, what does this indicate?

Sign in to bookmark

Correlation and Covariance

Q101. Can the correlation be greater than 1? Why or why not? How to interpret a correlation value of 0.3?

Sign in to bookmark

Correlation and Covariance

Q102. What is the Pearson correlation coefficient, and how is it calculated?

Sign in to bookmark

Correlation and Covariance

Q103. What is the significance of a correlation coefficient value of 0?

Sign in to bookmark

Correlation and Covariance

Q104. What is the difference between positive and negative correlation?

Sign in to bookmark

Correlation and Covariance

Q105. What are some limitations of the Pearson correlation coefficient?

Sign in to bookmark

Correlation and Covariance

Q106. Can you have a high correlation without causation?

Sign in to bookmark