this is my poor attempt at studying algebra, because around 70% of video game development involves math
this is moreso a self note than an article/blog.
obs1: when an operator has a number on top and in the bottom, those are called superscript and subscript, respectively.
* μ (pronounced mu) = the mean = the center, average value.;
* σ = sigma = lowercase sigma = standard deviation, how spread out the values are.
-variance = σ²;
-standard deviation = sqrt(variance) = σ;
* Σ = sigma = uppercase sigma = summation operator.
suppose the superscript is x, and the subscript is y, and the calculation in front of
the operator is a function named f that receives y, this translates to:
-for (, y <= x, y++)
--result += f(y)
* ∏ = pi = uppercase pi = dot operator. same thing as summation operator, except you multiply.
suppose the superscript is x, and the subscript is y, and the calculation in front of the operator
is a function named f that receives y, this translates to:
-for (, y <= x, y++)
--result *= f(y)
* |x| = absolute value.
if x is a real number, this equates to abs(x). if x is a set, the result represents
the number of elements in the set. if x is 2 points in a 3d space, the result is the
length/distance from point 1 to point 2.
* ∫ = integral. if it is accompanied with super and sub scripts, it is a definite
integral, if it comes with no scripts, it is indefinite. the integral is always
accompanied by ( (expression) d(variable) ).
with 0 and 3 being subscript and superscript, respectively, and x being the changing
variable, this equals to ∫³f(x) dx (imagine 0 in the bottom), which translates to:
-for(float x = 0; x < 3; x += dx)
--result += f(x) * dx;
continuing with integral, with 0 and 3 being subscript and superscript, respectively,
and with x, y and z being the changing variables, this equals to ∫³∫³∫³f(x, y, z) dx dy dz,
which translates to:
-for (float x = 0; x < 3; x+= dx)
-{
--for (float y = 0; y < 3; y += dy)
--{
---for (float z = 0; y < 3; z += dz)
---{
----float xm = x + dx/2;
----float ym = y + dy/2;
----float zm = z + dz/2;
----result += f(xm, ym, zm) * dx * dy * dz;
---}
--}
-}
formulas:
*markov inequality:
P(X >= a) <= E(X)/a
reads as: the probability of X being
higher than a is less or equal to the expected value of X divided by a.
chebyshev's inequality:
P(|X - μ| >= kσ) <= 1/k²
reads as: the probability of abs(X-μ) being higher than k*σ is less or
equal to 1 divided by k².
to extract a upper bound formula of chebyshev's inequality, we do:
P((X-μ)² >= k²σ²) <= 1/k² - square everything inside the probability box,
such way that X-μ is not negative
P((X-μ)² >= k²σ²) <= E[(X-μ)²]/k²σ² - switch over to markov's inequality
E[(X-μ)²]/k²σ² = 1/k²; E[(X-μ)²] = σ²; - since we applied markov's inequality,
we can see 1/k² is technically E[(X-μ)²]/k²σ², thus E[(X-μ)²] is technically σ².
σ²/k²σ² = 1/k² - and now we have the upper bound formula ! this is proven in
this wikipedia page.