Interesting projects and assignments from Psych 186B
When getting a distribution of dot products between two uniform, random, and normalized vectors, there's a trend that occurs where the variance of this distribution is
Let's use vectors
First we start with the definition of variance using the expectation value which is
Knowing the variance means we need to know these two expectation values. Since these values are all independent, then they can be treated as a linear system where
With this in mind, we can now apply principals of linearity to
First, we can trivially set
Next, we can notice that since
This property is important because now we can apply the top two results to see that
Another property we can can exploit is the dot product of the single vector with itself. Since
Finally, this can all be combined to show that
Then taking the square root, we get the standard deviation
How can this be shown computationally? We can do this by looking at this in terms of its geometric or algebreic significance.
Algebrically, if we let
Geometrically is harder. We'll have to use hyperspheres. But if we keep this at low dimensions, we can directly compute with simple knowledge of calculus.
2D Case. Let
3D Case. Using the same argument, this is now 3D so all the possible vector combinations will lie on a 3D unit sphere. $\text{Var}(A\cdot B) = \mathbb{E}[\cos^2\theta] - \mathbb{E}[\cos\theta]^2 = \frac{1}{4\pi}\int^{\pi}_{0}\cos^2\theta\sin\theta,d\theta\int^{2\pi}0,d\phi - \frac{1}{4\pi}\int^{\pi}{0}\cos\theta\sin\theta,d\theta\int^{2\pi}_0,d\phi = \frac{1}{3} - 0 = \frac{1}{3}$. Then