Skip to content

Latest commit

 

History

History
70 lines (38 loc) · 997 Bytes

math.md

File metadata and controls

70 lines (38 loc) · 997 Bytes

Math

a = a property

Reflexive

#math

If a = b and b = c then a = c property

Transitive

#math

If a = b then b = a property

Symmetric

#math

Logarithm definition

Inverse function to exponentiation

  • log2(1) = 0
  • log2(2) = 1
  • log2(4) = 2
  • log2(8) = 3
  • log2(16) = 4
  • etc.

#math

Median of a sorted array

If odd: middle value

If even: average of the two middle values (1, 2, 3, 4 => (2 + 3) / 2 = 2.5)

#math

n-choose-k problems

From a set of n items, choose k items with 0 <= k <= n

P(n, k)

Order matters: n! / (n - k)! // How many permutations

Order does not matter: n! / ((n - k)! k!) // How many combinations

#math

Probability: P(a ∩ b) // inter

P(a ∩ b) = P(a) * P(b)

#math

Probability: P(a ∪ b) // union

P(a ∪ b) = P(a) + P(b) - P(a ∩ b)

#math

Probability: Pb(a) // probability of a knowing b

Pb(a) = P(a ∩ b) / P(b)

#math