Do you know how the weather forecast works?
Today, supercomputers calculate predictions using complex mathematical models. Simply put, the forecast is based on meteorologists finding that if they measured certain values in the atmosphere in the past (this is what happened), then the weather came like that (that is what happened). And they assume that if they measure the same values again, the weather will develop as then (it will happen again). More or less, it really works. However, more and more variables come into play, so the prediction may not always be completely accurate.
But even though we often criticize weather women, they usually predict the weather much more accurately than if we predicted without them.
A simple form of prediction is i.e. linear regression. We can use it to predict that if a person in our game throws the number of balls x in the MEDIUM mode (THIS condition), then he will most likely hit the number of asteroids y (THAT consequence).
Since this is a linear regression (line = line), we can write this relation by the equation of the linear function y = ax + b and draw it as a line in the x, y coordinate axis.
For example, if we used the expression y = x / 2 + 2, we would predict that if a person throws 6 balls (x = 6), he will most likely hit 5 asteroids (y = 6/2 + 2 = 5).
But how do we find the right line to give us the most accurate forecast?
We’ll do what meteorologists do. We will look at previous situations, ie. how exactly real people threw, we draw it in a graph and adjust the line with which we can predict the future.
Well, let’s draw the points, but how do we know which line is better? Is it the first, the second, the third or some other?
We will not help so easily here and computer technology must come. The computer measures the distances of the points from a straight line along the y-axis by testing various possibilities. He adds all these distances and compares the result with the sum of the distances for the next line.
And so on and on until he finds the line that is least away from the points. And according to her, we can predict the future as well.
If we calculate the distance of a point on the y-axis from the line, then for points that are below it, we get negative numbers. However, we need to add the distances from the line, so we need positive numbers. What do I have to do with these differences before addition?
JOKE:
It’s a nonlinear pattern with outliers, but for some reason I’m very happy with the data.