Mean, standard deviation, correlation coefficient, regression line and least squares

Source: Internet
Author: User

Mean, standard deviation, correlation coefficient, regression line and least squares

Correlation

Linear correlation

The data fluctuates near a straight line, and the variables are linearly correlated

Nonlinear correlation

The data fluctuates around a curve, and the variables are non-linear related

Not relevant

Data does not show any relationships in the diagram, it is irrelevant

Average

The average of n data is calculated as a formula:

Standard deviation

The standard deviation represents the average distance of all data from the average, indicating the divergence of the data, if the standard deviation is small, indicating that the data set is near the mean, if the standard deviation is large, the data is far away from the standard deviation, more scattered. Standard deviation Calculation formula:

x, y two variables make up a coordinate (x, y) in the Cartesian coordinate system, which identifies the position of a point .

Each x, y data group containing n constants is represented by n points in a Cartesian coordinate system.

Correlation coefficient

The correlation coefficients are denoted by the letter R, which indicates the degree of linear correlation between the two sets of data (at the same time increasing or decreasing), and on the other hand measures the dispersion of points relative to the standard deviation, which has no units. A method for calculating the correlation coefficient r for x and y data with n values:

  

In simple words, the average of r=[(x in standard units) x (y in standard units)]

According to the above point definition, the relationship of X, y two sets of data is drawn in the Cartesian coordinate system in the form of point, theSD line represents the center point (the point that the Data group X, y mean is coordinates), when the r>0, the slope =x standard deviation/y standard deviation; When r<0, the slope = The standard deviation of the-X standard deviation/y The straight line. Usually the SD line is used to visually represent the direction of the data:

1, when the r<0, the slope of the SD line is less than 0 o'clock, the data is negative correlation, that is, when x increases, y decreases.

2, when the r>0, the slope of the SD line is greater than 0 o'clock, the data is positive correlation, when x increases when the y increases.

3, the correlation coefficient r range between [ -1,1], when r=0 indicates that the data correlation coefficient is 0 (irrelevant). When R= plus or minus 1 o'clock indicates negative data correlation, this (x, y) point data is on the SD line.

4, R value closer to the plus or minus 1 description (x, y) closer to the SD line, indicating that the stronger the data correlation, the closer the value of R 0 (x, y) point to SD line divergence (the more dispersed), the smaller the data correlation.

The regression method mainly describes how one variable depends on another variable. Y the regression line that corresponds to x describes the average value of y under different x values, which is the smooth form of these averages, and if the averages are just in a straight row, the averages coincide with the regression lines. With the regression line, we can predict the Y value by x value (the mean of Y value under the known X value). Here is the regression equation for y corresponding to x:

Simply put, when x is increased by 1 SD, on average, the corresponding Y increases r SD.

As can be seen from the equation:

1, the regression line is a passing point, the slope of the straight lines.

2, the slope of the regression line is smaller than the SD wire, when r=1 or-1, the regression line and SD lines coincide.

When you use the regression line to predict y from X, the difference between the actual value and the predicted value is called the prediction error. The root mean square error is the root mean square of the prediction error. It measures the degree of accuracy of the regression predictions. Y the root mean square error of the regression line for x is calculated using the following formula:

It can be seen from the formula that when R is closer to 1 or 1, the more points converge near the regression line, the smaller the root mean square error is, and the more the r is closer to 0 o'clock, the more dispersed the point, and the greater the RMS error.

The least squares method looks for a straight line to fit all the points so that the root mean square error between the line and all points is minimized. As you can see, when we find the relationship between the two variables, the least squares is actually the regression line. But the focus of the presentation is different:

1. The least squares method emphasizes to find the best fitting line for all points.

2, the regression line is based on the SD line is calculated, the sample is known as the variable x value of the variable Y.

From the above, a scatter plot can be described with five statistics:

1, the average of a bit of X-value, describes all points on the x-axis of the center point.

2, a bit of X-value of the SD, describes the distance of all points from the X center point divergence.

3, the average of a little Y value, describes all points on the Y axis of the center point.

4, the SD with a bit Y value, describes the divergence of all points from the Y center point.

5, correlation coefficient r, based on the standard unit, describes the relationship between all points x value and Y value.


The correlation coefficient R links the concepts of mean, standard deviation, and regression line:

1. R describes the degree of clustering of points along the SD line relative to the standard deviation.

2, R shows how the average y depends on x---x each additional 1 x standard deviation, on average, Y will only increase the R y standard deviation.

3, R through the mean square root error formula, determine the accuracy of the regression prediction.

Note : The above correlation coefficients, the regression line, the least squares calculation must be under the following two conditions can be established:

1, x, y two sets of sample data is linear, if not linear first to do the conversion.

2. The relationship between the two sets of sample data to be studied must be meaningful.

Mean, standard deviation, correlation coefficient, regression line and least squares

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.