commit 6feb9c7f0940d1bce3493c73a4cff03f834844f1
parent a26c56180493d670a501de417b57423010204d4d
Author: Andrew <andrewlaack1@gmail.com>
Date: Mon, 12 Aug 2024 16:55:25 -0500
took notes for linear algebra and prob
Diffstat:
15 files changed, 294 insertions(+), 6 deletions(-)
diff --git a/AmbientSpace.md b/AmbientSpace.md
@@ -0,0 +1,10 @@
+:lin-alg:
+# Ambient Space
+
+Khan U2
+
+## Notes
+
+**Definition:** The ambient space is the space surrounding some object.
+
+When describing a cube the ambient space would be R^3. When discussing a hyperplane with four dimensions the ambient space would be R^5.
diff --git a/AstronomicalUnit.md b/AstronomicalUnit.md
@@ -0,0 +1,15 @@
+:physics:
+# Astronomical Unit (AU)
+
+CM L1
+
+## Notes
+
+**Definition:** An astronomical unit is a measure of distance defined as the mean distance between the earth and the sun.
+
+Distance in Meters:
+149,597,870,700m
+
+## Usage
+
+This unit of measure is often used in relation to solar systems when km and light seconds are not very applicable given their respective low/large values being hard to interprit.
diff --git a/Determinant.md b/Determinant.md
@@ -5,7 +5,7 @@ CS331 - Linear Algebra - Khan U2
## Notes
-**Definition:** The determinant is the scaling factor of some area (or volume in 3d space) from before to after a linear transformation.
+**Definition:** The determinant is the scaling factor of some area (or volume in 3d space) from before to after a linear transformation. Note that this is only useful in 3d and 2d as the notion of volume in higher dimensions ([[Hypervolume.md]]) is a bit abstract.
This value can be negative if the space has been flipped. In 3d space, this means the volume after the tranformation is in left hand space if it was before in right hand space.
@@ -36,8 +36,114 @@ Note: You don't need to use the first row as the row you traverse to find the de
With this, you are not stick layer to layer with a given row either so you can select the last row for the largest matrix and the second for a smaller and so on.
+Also, this can be done with either **any row or column**.
+
#### Scalar
When multiplying a **row** by a scalar the resulting determinant is equal to the original determinant multiplied by the scalar.
This can be extrapolated to the size of a matrix (matrix times scalar) and thus it becomes dependent upon the number of rows in the matrix.
+
+#### Row Addition + Subtraction
+
+If you have two matricies that are identical apart from a singular row then the sum of the individual determinants will be equal to the determinant of the matrix where the differing row components are added together.
+
+Example:
+
+A = [1 2]
+ [3 4]
+
+B = [1 2]
+ [4 5]
+
+C = [1 2]
+ [3+4 4+5]
+
+|A| = 4 + -6
+= -2
+
+|B| = 5 + -8
+= -3
+
+|C| = 9 + -14
+= -5
+= |A| + |B|
+
+In a similar vein, when subtracing a row the resulting determinant is equal to the determinant of the original minus the determinant of the subtracted row's matrix.
+
+A = [1 2]
+ [3 4]
+
+B = [1 2]
+ [4 5]
+
+C = [1 2]
+ [3-4 4-5]
+
+|A| = 4 + -6
+= -2
+
+|B| = 5 + -8
+= -3
+
+|C| = -1 + 2
+= 1
+= |A| - |B|
+
+#### Row Swap
+
+If we are to swap two arbitrary rows in a matrix the det(A) = -det(S) where S is the swapped matrix.
+
+#### Upper Triangle Determinant
+
+The determinant of a matrix where the bottom left triangle is all zeroes is equal to the product of the values on the diagonal.
+
+Ex.
+
+ [2 9 8]
+A = [0 8 7]
+ [0 0 7]
+
+
+det(A) = 2x8x7 = 112
+
+Written out taking the determinant using the first column:
+
+det(A) = 2 | 8 7 | + 0 + 0
+ | 0 7 |
+= 2x56
+= 112
+
+Given that:
+
+| 8 7 | = 8x7 = 56
+| 0 7 |
+
+#### Lower Triangle Determinant
+
+As was shown above, the same is true for a lower triangle matrix where the top right corner is all zeroes.
+
+[x 0 0 ... 0]
+[x x 0 ... 0]
+[...........]
+[...........]
+[...........]
+[x x ... x x]
+
+#### Simplification
+
+When simplifying the most important rule is that you can subtract any row from any other row in the matrix multiplied by an arbitrary scalar and still have the same determinant.
+
+Another rule that is important is the row swapping rule described above.
+
+More formally with a_x being a row in A:
+
+A = [a_1]
+ [a_2]
+ [a_3]
+
+B = [a_1 - ca_x]
+ [a_2 ]
+ [a_3 ]
+
+|A| = |B| for any scalar c and any row of A defined as a_x.
diff --git a/Hyperplane.md b/Hyperplane.md
@@ -0,0 +1,8 @@
+:lin-alg:
+# Hyperplane
+
+Khan U2
+
+## Notes
+
+**Definition:** A hyperplane is a 3-dimensional or higher subspace with dimensionality that is one less than the [[AmbientSpace.md]].
diff --git a/Hypervolume.md b/Hypervolume.md
@@ -0,0 +1,8 @@
+:lin-alg:
+# Hypervolume
+
+Khan U2
+
+## Notes
+
+**Definition:** Hypervolume much like [[Hyperplane.md]] is volume in dimensions higher than 3.
diff --git a/LinearAlgebra.md b/LinearAlgebra.md
@@ -7,7 +7,6 @@ The basis of linear algebra is solving systems of equations.
## Links
-
Khan Unit 1 (mostly):
- [[Matrix.md]]
- [[LinearEquations.md]]
@@ -63,3 +62,8 @@ Khan Unit 2:
- [[Inhomogeneous.md]]
- [[Determinant.md]]
- [[RuleOfSarrus.md]]
+ - [[Hypervolume.md]]
+ - [[Hyperplane.md]]
+ - [[AmbientSpace.md]]
+ - [[Shear.md]]
+ - [[RightHandRule.md]]
diff --git a/MarkovChains.md b/MarkovChains.md
@@ -5,8 +5,67 @@ L13
## Notes
-**Definition:** A markov chain is a sequence of events where the probability of any given event is entirely based on the previous event.
+**Definition:** A markov chain is a sequence of events where the probability of any given event is **entirely** based on the previous event.
+
+Given that the state needs to have all relevant information, we need to choose our states properly to ensure accuracy.
Anything that evolves with time can be described as a markov chain.
These types of processes are not memoryless like [[BernoulliProcess.md]] or [[PoissonDistribution.md]].
+
+#### Markov Assumption
+
+The Markov assumption is the assumption that each state describes the probability of all transitions related to it regardless of prior states/transitions.
+
+#### Finite Markov Chain Example
+
+Checkout counter:
+
+Customers get in queue (bernoulli process) and then they are served one at a time.
+
+If customer is in queue they are then served which takes a random amount of time.
+
+What is the probability of a customer departing at a given time?
+ - If the queue is empty the odds are 0 (assuming the person being seen is still in the 'queue')
+ - If the queue is not empty then the odds are not 0
+
+As such, this depends on the state of the system making it a markov chain.
+
+If there are only 10 customers who can be in the place then we can write out all states from 0 people to 10 people along with relations between them relating to people moving up the queue, being added to the queue, no changes, and adding to queue and removing at the same time. All of these probabilities summed have to equal 1 for each state.
+
+Each of these connections (transitions) have their own probabilities.
+
+#### Creation
+
+Identify all possible states (think about if each state is sufficient to assign transition probabilities)
+
+Identify transitions
+
+Find transition probabilities (sum to 1)
+
+#### n-step transition probability
+
+n-step transition probabilities are probabilities that starting at state i after n steps we are now in state j. This is stated as:
+
+r_{ij}(n) = P(X_n=j | X_0=i)
+
+To calculate this we can find the probability of each transition for all steps until and including step number n. This is done by multiplying the probablity of a given state by the probability of the transition. The solution will be the final probability of the state j.
+
+Alternatively, we can use recursive approach to find the probability of each transition that connects to the state i.
+
+
+#### Steady State (Convergence)
+
+The steady state of a markov chain is the constant probability of some given state after an arbitrarily long period of time. This can be thought of the limit as n approaches infinity. If there is not convergence then there is not a steady state.
+
+In most cases we will reach a steady state but this might not happen in cases of [[PeriodicChain.md]] or irreducability where not all states there are two seperate recurrent loops. The seperate recurrent loops cause a non-steady state because steady states need to be initial condition agnostic.
+
+#### Recurrent
+
+A state is recurrent if starting from the state there is always a way to get back. We will always end up in a recurrent state after an arbitrarily long period of time as transient states will enventually become unreachable.
+
+#### Transient
+
+Transient states are states that are not recurrent meaning there are cases where you can not get back to them assuming they are the initial state.
+
+As such, the probability of the current state being a transient state after an arbitrarily long time is 0.
diff --git a/MarkovProcess.md b/MarkovProcess.md
@@ -0,0 +1,8 @@
+:prob:
+# Markov Process
+
+Prob L16
+
+## Notes
+
+**Definition:** Markov processes are multiple trials of [[MarkovChains.md]].
diff --git a/PeriodicChain.md b/PeriodicChain.md
@@ -0,0 +1,16 @@
+:prob:
+# Periodic (Markov) Chain
+
+L17
+
+## Notes
+
+**Definition:** Periodic Markov chains are a specific type of Markov chain defined as a chain with groups such that all transitions frome one group lead to the next group.
+
+Periodic Markov chains are interesting because they never achieve a steady state.
+
+Example:
+
+Imagine you are walking in circles at a constant rate. You start at location 0. The next time you are polled you are at location 1 then location 2 then 0 again. This cycle repeats ad infinium.
+
+Each transition in the above example has a probability of 1 and the current state will always n mod 2 where n is the number of steps since the intial state assuming the intial state is 0.
diff --git a/Physics.md b/Physics.md
@@ -0,0 +1,12 @@
+:index: :physics:
+# Physics Links
+
+Physics related content
+
+### Classical Mechanics (MIT OCW)
+
+Takeaways:
+ - TAKEAWAYS HERE AT THE END
+
+L1
+ - [[AstronomicalUnit.md]]
diff --git a/RightHandRule.md b/RightHandRule.md
@@ -0,0 +1,12 @@
+:lin-alg: :cs331:
+# Right Hand Rule
+
+3B1B
+
+## Notes
+
+**Definition:** The right hand rule describes the relation between the axis components in R^3.
+
+When the right hand rule is true we have i being the index figer, j being the middle, and k being the thumb. These correspond with <1,0,0>, <0,1,0>, and <0,0,1> respectively.
+
+When the right hand rule is untrue under a transformation we know the determinant is negative as space has inverted.
diff --git a/RuleOfSarrus.md b/RuleOfSarrus.md
@@ -10,7 +10,7 @@ Khan U2
Formula:
[a b c]
-Det ([d e f]) = aei + bfg + cdh - afh - bhi - ceg
+Det ([d e f]) = aei + bfg + cdh - afh - bdi - ceg
[g h i]
When looking at the matrix we add the multiplied diagonals (starting from top row 3 values) to the right and subtract the diagonals to the left (multiplying each value in the diagonal).
diff --git a/Shear.md b/Shear.md
@@ -0,0 +1,22 @@
+:lin-alg:
+# Shear (transformation)
+
+3B1B
+
+## Notes
+
+**Definition:** A shear is a type of linear transformation where one axis is 'slid' while the other reamins the same.
+
+The following is the form of a shear in R^2 where the x values are scaled and the y value stays the same:
+
+(Horizontal)
+
+[1 k]
+[0 1]
+
+Note that k is an non-zero value.
+
+(Vertical)
+
+[1 0]
+[k 1]
diff --git a/StatisticsAndProbability.md b/StatisticsAndProbability.md
@@ -94,3 +94,11 @@ L13:
L14:
- [[PoissonProcess.md]]
- [[BernoulliProcess.md]]
+L15:
+ - Skipped this as it was poisson part 2
+L16:
+ - [[MarkovChains.md]]
+ - [[MarkovProcess.md]]
+L17:
+ - [[MarkovChains.md]]
+ - [[PeriodicChain.md]]
diff --git a/index.md b/index.md
@@ -23,11 +23,11 @@ This is the index for my main note classifications. I will maintain this as a ho
[[LinearAlgebra.md]]
[[Calculus.md]]
[[Algorithms.md]]
+[[Physics.md]]
## Things to Learn More About
Stats + Prob
- - [ ] Markov Chains
- [ ] ECDF (sort of like cdf)
- [ ] Convolution (not NN)
- [ ] https://en.wikipedia.org/wiki/Primality_test
@@ -48,4 +48,4 @@ ML
- [ ] KAN
Physics
- - [ ] Astronomical Unit
+ - [ ]