Correlation between two variables
变量的相关关系
What is a correlation between two variables?
Two quantities are correlated when they move together without one determining the other exactly; a function would fix one from the other.
Sign in to read the whole lesson, with 3 exercises
Sign in / Sign upMastery goals
- Can explain, with examples, what a correlation between two variables is (the variables are related but one does not determine the other exactly) and how it differs from a functional relationship
- Can explain what paired data are
- Can explain positive and negative correlation, linear correlation and nonlinear (curvilinear) correlation, and decide from a scatter plot which kind two variables show
Chapter opener
In the compulsory course we learned how to show the observed data of a single variable visually and how to describe their statistical features. For example, a histogram describes how sample data are distributed, the mean describes their central tendency, and the variance describes how spread out they are. These methods are mainly for learning the statistical patterns of one variable from a sample. In real life, however, we often need to know how two or more variables are related. For example, to keep track of students' health, education departments need to know how the variables height and weight are related; to plan measures against short-sightedness in young people, health departments need to know which factors affect eyesight and how; to improve their service, businesses want to know from customers' comments which factors affect the quality of service and how they act. So we need to go further and learn how to infer relationships between variables from samples.
This chapter covers the statistical correlation of paired data, the simple linear regression model and contingency tables. These ideas and methods are very useful for solving practical problems. We will see that the correlation of two random variables can be analyzed from paired sample data; that a simple linear regression model can be used to study the random relationship between variables and to make predictions; and that a contingency table can be used to test whether two random variables are independent. This chapter helps build the ability to solve practical problems, as well as skills in data analysis and mathematical modelling.
8.1 Statistical Correlation of Paired Data
We know that if the variable is a function of the variable , then determines uniquely. In the real world, however, two variables may be related without the relationship being as tight as a function. For example, a person's weight is related to his or her height, but knowing someone's height does not determine his or her weight. How, then, can the relationship between these two variables be described? That is the question we study now.
8.1.1 Correlation between Variables
We know that a person's weight is related to his or her height. Generally, tall people tend to weigh more and short people tend to weigh less. But height is not the only thing that decides weight: eating habits, exercise, sleep, heredity and so on also matter a great deal.
When two variables are related, but not so exactly that one of them determines the other precisely, the relationship is called a correlation.
Pairs of variables with a correlation are everywhere. For example:
- A child's height and the father's height . Generally, tall fathers have fairly tall children and short fathers have fairly short children. But besides the father's height, the mother's height, diet, exercise and other things also affect a child's height, so the father's height cannot fully decide it.
- Sales revenue of a product and advertising spending . Generally, the more spent on advertising, the higher the sales revenue. But advertising is not the only thing that decides sales revenue, which also depends on the product's quality, people's incomes and so on.
- An air pollution index and the number of cars . Generally, as the number of cars grows, the pollution index rises. But cars are not the only cause of air pollution: the weather, industrial waste gas, households' daily life and heating, burning rubbish and so on all affect the index.
- Grain yield per mu and the amount of fertilizer . Within a certain range, the more fertilizer, the higher the yield. But fertilizer is not the only thing that decides the yield, which is also affected by soil quality, rainfall, how well the field is managed and so on.
In a correlation, the value of is not uniquely determined once the value of is fixed, so we cannot describe such a relationship directly with a function. For the correlations in the examples above, we often judge from our own past experience. "There are patterns in experience", and experience does give some basis for decisions, but judging by experience alone has drawbacks: people with different experience may reach different conclusions about the same situation, and not every situation has experience to go on. So when we study the correlation between two variables we need to let the data speak: analyze sample data, extract information from them, build a suitable model, and then use the model to estimate or infer.
Related points
All points in this topicCite this page: Correlation between two variables · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP004467