3 ms·
1. Long division uses a similar idea to Euclid's algorithm for GCD. Are you familiar with that? Regardless, both algorithms are divide and conquer algorithms.
by sicariusnoctis 7y ago
1. Long division uses a similar idea to Euclid's algorithm for GCD. Are you familiar with that? Regardless, both algorithms are divide and conquer algorithms.
6240 / 5
= divide(6240, 5)
= divide(1240, 5) + 1000
= divide(240, 5) + 1000 + 200
= divide(40, 5) + 1000 + 200 + 40
= 1000 + 200 + 40 + 8
= 1248
----------
2. Regarding standard deviation, one of these bullets might help:
- The normal distribution has exactly one shape, centered at x=0. But it's useful to apply two transformations to it: translation and horizontal stretch. To translate a distribution left/right, change its mean. To horizontally stretch a normal distribution, change its standard deviation.
- Mean has units of length. Standard deviation has units of length. They tell you where the normal distribution is offset, and how wide it is. Mean and standard deviation are just measuring sticks/rulers for normal distributions.
- When people talk about the standard deviation with any arbitrary data, they're usually assuming the data is normally distributed. If the data is not normally distributed, standard deviation no longer refers to the width of the normal distribution, so we lose that visualization.
- With non-normally distributed data, the standard deviation is still useful as an analytical tool because taking the (sqrt of the) summed squares still gives us a number that grows as the data spreads further apart or if the distribution grows wider. There's a center point for the data (the mean), so to ensure you're measuring the overall spread of the data, you subtract the center point off each data point before squaring them. In other words, you're squaring deviations from the mean. And unlike the sum of absolute differences, the sum of squared differences (variance) is differentiable. Differentiability is a great property, so this is the standard way to compute a sum of deviations from the center.