Probability of an event A given that an event B has occurred. For example, what is the probability of a patient having a particular disease, given that the patient tested positive for the disease? This is known as the conditional probability of A given B known as Bayes' rule
Under Bayes' rule, P(A) is known as prior, P(B|A) as the likelihood, and P(A|B) as the posterior. As per this rule, A and B have to be dependent on each other. If they are independent then P(A|B) will be P(A).
Similarly, it is possible for A and B to be conditionally independent given the occurrence of another event C.
TODO
The concept of counting typically shows up in form or another in most interviews. Some questions may directly ask about counting (e.g. "How many ways can five people sit around a lunch table?"), while others may ask a similar question, but as a probability (e.g., "What is the likelihood that I draw four cards pf the same suit?").
Two forms of counting elements are generally relevant. If the order of selection of the n items being counted k at a time matters, then the method for counting possible permutations is employed:
In contrast, if order of selection does not matter, then the technique to count possible number of combinations is relevant:
A random variable is a quantity with an associated probability distribution. It can be either discrete or continuous.
Discrete: Have a countable range Continuous: Have a uncountable range
The probability distribution associated with a discrete random variable is a probability mass function (PMF), and that associated with a continuous random variable is a probability density function (PDF).
In discrete case, X can take on particular values with a particular probability In continuous case, probability of a particular x is not measurable; instead a "probability mass" per unit per length around x can be measured
The binomial probability distribution gives the probability of k number of successes in n independent trials, where each trial has probability p of success. Its PMF is
The most common applications for a binomial distribution are coin flips (the number of heads in n flips), user signups and any situation involving counting some number of successful events where outcome of each event is binary.
The Poisson Distribution gives the probability of the number of events occurring within a particular fixed interval where the known, constant rate of each event's occurrence is lambda. The most common applications for a Poisson distribution are in assessing const over a continuous interval, such as the number of visits to a website in a certain periods of time or the number of defects ina square foot of fabric. Thus, instead of coin flips with probability p of a head as a use case of the binomial distribution, applications of the Poisson will involve a process X occurring at a rate lambda.
The uniform distribution assumes a constant probability of an X falling between values on the interval a to b. Its PDF is
The most applications for a uniform distribution are in sampling random number generation for example and hypothesis testing cases.
The exponential distribution gives the probability of teh interval length between events of a Poisson process having a set rate parameter of lambda. The most common applications for an exponential distribution are in wait times, such as the time until a customer makes a purchase or the time until a default in credit occurs. One of the distribution's most useful properties, and one that makes for natural questions, is the property of memory less ness the distribution.
The normal distribution distributes probability according to eh well known bell curve over a range of X's. Many applications involve the normal distribution, largely due to its natural fit to many real life occurrences, and the central limit theorem.
A Markov chain is a process in which there is a finite set of states, and the probability of being in a particular state is only dependent on the previous state. Stated another way, a Markov property is such that, given the current state, the past and future states it will occupy are conditionally independent.
A recurrent state is one whereby, if entering that state, one will always transition back into that state eventually. In contrast, a transient state is one in which, if entered, there is a positive probability that upon leaving, one will never enter that state again.
A stationary distribution for a Markov chain satisfies the following characteristics: pie = pie*P, where P is a transition matrix,a nd remains fixed following any transitions using P. Thus P contains the long run proportions of teh time that a process will spend in any particular state over time.