notes

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0208950102328e23435e869e2f7141749d20acc1
parent c0cd66712dce0751976f4ae1ed7cf13c4591eb89
Author: Andrew <andrewlaack1@gmail.com>
Date:   Wed, 24 Jul 2024 13:26:38 -0500

Took notes on cont. rnd variables lecture

Diffstat:
ABernoulliRandomVariable.md | 10++++++++++
ACumulativeDensityFunction.md | 20++++++++++++++++++++
AIdentityMatrix.md | 21+++++++++++++++++++++
AImage.md | 20++++++++++++++++++++
MLinearAlgebra.md | 2++
MLinearTransformation.md | 24++++++++++++++++++++++++
AMixedRandomVariable.md | 12++++++++++++
MNormalDistribution.md | 6++++--
MProbabilityDensityFunctions.md | 12+++++++++++-
MProbabilityMassFunction.md | 2++
MStandardization.md | 10++++++++--
MStatisticsAndProbability.md | 8+++++++-
12 files changed, 141 insertions(+), 6 deletions(-)

diff --git a/BernoulliRandomVariable.md b/BernoulliRandomVariable.md @@ -0,0 +1,10 @@ +:prob: +# Bernoulli Random Variable + +Prob L8 + +## Notes + +**Definition:** A bernoulli random variable is a random variable that has a bernoulli distribution where the outcome is binary. + +In a bernoulli distribution the probability of any given event x is defined as p and the probability of not x is defined as 1-p. diff --git a/CumulativeDensityFunction.md b/CumulativeDensityFunction.md @@ -0,0 +1,20 @@ +:prob: +# Cumulative Density Function (CDF) + +Prob L8 + +## Notes + +**Definition:** A cumulative density function is a function of a random variable where any given value is the probability of getting an output less than or equal to the current value. + +This is defined mathmatically as F(x) = P(X \leq x). + +The value of a CDF is it combines discrete probability functions (PMFs) and continuous probability functions (PDFs) into one function definition resolving the need to do multiple computations for both. + +Note: CDFs sum up to an arbitrary value, but the value at F(inf) should always be 1. + +## Values + +With a CDF we find the probability of a value or less than it being selected as the value F(x). + +When finding the probability of a range we subtract the end from the start of the range. diff --git a/IdentityMatrix.md b/IdentityMatrix.md @@ -0,0 +1,21 @@ +:lin-alg: +# Identity Matrix + +Khan Unit 2 + +## Notes + +**Definition:** The identity matrix is the matrix in R^n such that any matrix in R^n multiplied by it is equal to itself. + +This matrix can be stated as follows where each row has one '1': + +[1 0 0 ... 0] +[0 1 0 ... 0] +[. . . ... .] +[. . . ... .] +[. . . ... .] +[0 0 0 ... 1] + +## Interesting Notes + +The columns of the identity matrix are called the **standard basis** of R^n because each vector is a unit vector, they are linearly independent, and can construct any vector in R^n. diff --git a/Image.md b/Image.md @@ -0,0 +1,20 @@ +:lin-alg: +# Image + +Khan U2 + +## Notes + +**Definition:** The image of a function is the total set of all outputs of a given function (transformation for vectors). + +This is the same as [[Range.md]]. + +Subsequently the preimage is the domain of the function with mappings to elements of the image. + +## Lin Alg Specific + +The result of the tranformation of a subspace is the image of the subspace under T where T is the transformation. + +Ex. + +T(V) = image of V under T diff --git a/LinearAlgebra.md b/LinearAlgebra.md @@ -45,3 +45,5 @@ Khan Unit 2: - [[Range.md]] - [[Transformations.md]] - [[LinearTransformation.md]] + - [[IdentityMatrix.md]] + - [[Image.md]] diff --git a/LinearTransformation.md b/LinearTransformation.md @@ -16,3 +16,27 @@ T(a + b) = T(a) + T(b) T(ca) = cT(a) This is necessary and sufficient for the function T to be a L.T. + +This can be stated as the origin must remain fixed and all lines must remain lines. If we visualize this then the first requirement can be thought of as only allowing all grid lines to rotate but not offset. To visualize the second think that we can't have grid lines in the end that curved. As such, all uniform grid lines must be uniformly spaced in the end as well otherwise diagnol lines would become curved and thus the function would not respect lines. + +## Interesting Notes + +When determining mappings of LTs we can use our knowledge of the multiplicative nature of LTs to say c <x, 0> = <cx,0> for any coeficcient c. This is powerful as it allows us to describe any (input) vector on the line that contains any other (input) vector that we already know the mapping for. + +Ex. + +[1] -> [5] +[0] [2] + +Then we know + +[2] -> [5x2] = [10] +[0] [2x2] [ 4] + +Given this, if we know what the unit vectors map to we can then use them as a composite for all other mappings. In n dimensional space this means we have n vectors of length 1 where each vector has all zero components except one which is = 1. + +When describing LTs in matrix form each column represents where a given unit vector will be mapped to. This is ordered so the first column will be the mapping of [1,..., 0] the second [0, 1, ..., 0] and so on. + +**Important:** + +Any LT can be represented as a matrix and all matrix multiplication is a LT. diff --git a/MixedRandomVariable.md b/MixedRandomVariable.md @@ -0,0 +1,12 @@ +:prob: +# Mixed Random Variable + +Prob L8 + +## Notes + +**Definition:** A mixed random variable is a [[RandomVariables.md]] comprised of some continuous and discrete randomness. + +An example is a random variable where there is a 1/2 chance of flipping a coin (discrete) to get 1 dollar and a 1/2 chance of getting a random number of dollars between 0 and 1 (continuous). This is a tree where the first split is between coin flip and random value then there is another layer where you flip the coin or get the random amount of money. + +These types of variables can often be combined into a [[CumulativeDensityFunction.md]] to show the probability of getting a value or less than it. diff --git a/NormalDistribution.md b/NormalDistribution.md @@ -1,8 +1,10 @@ -:stats: +:stats: :prob: # Normal Distribution -Stats D1 +Stats D1 + Prob L8 ## Notes **Definition:** A normal distribution is a unimodal one in which most observations cluster around the mound while fewer and fewer observations are farther away. + +With normal distributions we often refer to them in regard to the standard normal distribution which is the normal distribution defined as the distribution centerd about 0 with a std deviation of 1. This is conveninent to project other graphs onto given that normal distributions don't have a percentile calculation in the closed form thus we use lookup tables. diff --git a/ProbabilityDensityFunctions.md b/ProbabilityDensityFunctions.md @@ -1,4 +1,4 @@ -:stats: +:stats: :prob: # Probability Density Functions (PDFs) Stats ch1 @@ -7,8 +7,18 @@ Stats ch1 **Definition:** A probability density function shows the probability of outcomes for [[ContinuousProbability.md]] problems. +**Important:** PDFs are for continuous random variables whereas PMFs are for discrete. + Think of KDEs and kind of histograms. The difference with histograms is they use bins instead of a continuous probability graph. Something to note, the area under the curve is the probability. As such, the likelihood of all values that come before some value is the integral over said range (Antiderivative. See fundamental theroem of calculus). Another property of a PDF is that the integral of -infinity to infinity is always equal to 1 and p(y) >= 0 for all y. This means there is never a negative probability and there is a 100% probability across the domain of the function. + +## Percent Calculation + +The integral along a specified range is the probability of something happening in that range. This is thought of as the area below the curve for the specified range. + +An interesting thing about this is that any given point, given that it is uncountable, will have a p(x) = 0, but when calculating the area we find a value. + +Additionally, we find that the integral of the function from -inf to inf is always equal to 1. diff --git a/ProbabilityMassFunction.md b/ProbabilityMassFunction.md @@ -7,6 +7,8 @@ L4 **Definition:** A PMF describes the probability of some mapping of a [[RandomVariable.md]] from inputs to a specific output. +**Important:** PMFs are for discrete random variables whereas PDFs are for continuous. + This can be displayed as some form of bar graph. To find the PMF value for a given point we sum the probability of each input that maps to the output in question. diff --git a/Standardization.md b/Standardization.md @@ -1,4 +1,4 @@ -:ml: +:ml: :prob: # Standardization ML CH2 @@ -25,4 +25,10 @@ for i in df: print(df) -``r +``` + +## Probabilistic Interpretation + +Standardization is the process of mapping some arbitrary [[NormalDistribution.md]] onto the normal distribution centered at 0 with a standard deviation of 1. This can be done simply by subtracting the mean of the normal distribution from each element and then dividing the subsequent values by the average standard deviation. + +We do this because there is not a closed form solution to find the percentiles of a normal/gaussian distribution thus we use a lookup table which assumes the distribution is centered about 0 with a std. deviation of 1. This is all that is needed to fully describe a gaussian distribution. diff --git a/StatisticsAndProbability.md b/StatisticsAndProbability.md @@ -71,4 +71,10 @@ L6: L7: - Review L8: - - [[]] + - [[ProbabilityMassFunction.md]] + - [[ProbabilityDensityFunctions.md]] + - [[Standardization.md]] + - [[CumulativeDensityFunction.md]] + - [[MixedRandomVariable.md]] + - [[NormalDistribution.md]] + - [[BernoulliRandomVariable.md]]