Skip to Content

Probability Math

6 posts

Posts tagged with Probability Math

Discrete Random Variables

Definition of Random variable

Decide an experiment random with S as sample space. A function X which assigns to every outcomes $s \in S$, a real number X(s) = x is called a random variable.

Example:

When we toss a coin. S the sample space {H, T}. Defining a random variable X as:

  • X(H) = 1 (if the result is heads)
  • X(T) = 0 (if the result is tails)

Definition: Discrete random variable and probability mass function.

A random variable called X, which is able to take on a countable number of values is a discrete random variable, which probability

Discrete Random Variables Read more

Bayes’ Theorem

Formula

$$ P(B|A) = \frac{P(A|B)P(B)}{P(A)} $$

Prove using conditional probability

$P(A|B) = \frac{P(A\cap B)}{P(B)}$, and, $P(B|A) = \frac{P(B\cap A)}{P(A)}$,$P(A\cap B)$same as $P(B \cap A)$

$$ P(A|B) \cdot P(B) = P(B|A) \cdot P(A) = P(A\cap B) $$ $$ P(A|B) \cdot P(B) = P(B|A) \cdot P(A) $$

Finally: $P(B|A) = \frac{P(A|B) \cdot P(B)}{P(A)}$

Defintion:

P(B) is the prior

P(A|B) is the likelihood

Bayes’ Theorem Read more

Conditional Probability

Definition

When it comes to two events A and B, if P(B) > 0, then the probability of A given B is

$$ P(A|B) = \frac{P(A\cap B)}{P(B)} $$

Example

Rolling a dice with two events:

  • A: Outcomes is an even number
  • B: Outcomes is greater than 3

The sample space for rolling a dice is: $\{1,2,3,4,5,6\}$

  • Event A: $\{2,4,6\}$(even number)
  • Event B: $\{4,5,6\}$(greater than 3)
  • Intersection $A \cap B: \{4,6\}$(numbers that even and greater than 3)

Based on the formula of $P(

Conditional Probability Read more

Fundamental of Probability

Compute Probabilities

3 things to be able to compute probabilities from an experiment:

  1. A sample space S, at the set of results of the experiment, for example, in the coin toss experiment, the sample space S is the set of all possible outcomes: $S = \{Heads, Tails\}$
  2. Collection of events $E \subseteq S$, for example, the same coin toss, an event E could be “getting Heads”, which is $E = \{Heads\}$. Another event could be “getting Tails”, so $E = \{Tails\}$
  3. Function $P(E)$on the events, for instance, the probability function P(E) assigns a probability to each event. For a fair
Fundamental of Probability Read more

A reality example of Probability

Poker cards

52 cards at a deck with 4 type hearts, club, diamonds, spades, and including 13 for each.

  1. What is the probability of choose 2 red cards from this deck

52 cards: $\frac{26}{52} \cdot \frac{25}{51}$

  1. What is the probability of choose number 4 cards from this deck

52 cards, 4 cards having number 4: $\frac{4}{52}$

  1. What is the probability of choosing number 4 cards from this deck? Given these are black cards

52 cards, 4 cards having number 4 with 2 blacks and 2 reds: $\frac{2}{52}$

Numeric numbers

How many number

A reality example of Probability Read more

Functions in math

Functions in math
Photo by Antoine Dautry / Unsplash

y = f(x), Domain: D

$$ f(x) = \sqrt{x+2}, D = x + 2 \ge 0 \leftrightarrow x \ge -2 $$

D(f) = [2, inf]

Polynomials

$$ p(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_1 x + a_0 $$

For example

Type of Polynomials Degree Definition Example
Constant 0 simply a constant term. $f(x) = 5$  
Linear 1 represents a straight line $ f(x) = 2x - 3$  
Quadratic 2 represents a parabola $f(x) = x^2 + 4x + 1$
Cubic 3 $f(x) = 3x^3 - 2x^2 + x + 7$
Quartic 4 $f(x) = x^4 + 7x^3 -
Functions in math Read more