Contingency Table, Scatterplot & Pearson’s r

Contingency table, scatterplot, and Pearson’s r are all statistical tools used to analyze and interpret relationships between two variables. However, they differ in terms of the type of data they analyze and the information they provide.

Contingency Table

A contingency table, also known as a cross-tabulation table, is a table that displays the frequency distribution of two or more categorical variables. It is a tool used to understand the relationship between two or more categorical variables. The table shows the number or percentage of cases falling into each possible combination of categories for the variables being studied.

It is very similar to a frequency table. But the major difference is that a frequency table always concerns only one variable, whereas a contingency table concerns two variables.

If you want to know the relationship between two ordinal or nominal variables then you have to look for contingency table which displays you this relationship.

For example, the above contingency table has two rows and five columns and shows the results of a random sample of   adults classified by two variables, namely gender and favorite way to eat ice cream. One benefit of having data presented in a contingency table is that it allows one to more easily perform basic probability calculations, a feat made easier still by augmenting a summary row and column to the table.

The above table is an extended version of the first table obtained by adding a summary row and column. These summaries allow easier computation of several different probability-related quantities. For example, there’s a  1002 / 2200 = 45.54 % probability that the person sampled prefers their ice cream in a cup, while the probability that a random participant is female is 1000/2200 = 45.54 % . What’s more, computing conditional probabilities is made easier using contingency tables, e.g., the probability that a person prefers ice cream sandwiches given that the person is male is 24/2200 = 2% , while the conditional probability that a person is male given that ice cream sandwiches are preferred is  24/44= 54.54 %. These things are called conditional proportion and marginal proportion.

You can calculate column percentage for each variable like the example above.

Column percentage= cell / total (column) *100

Now from this table you can see if two variables are correlated or not.

 

Quantitative Variable and Scatter Plot

A scatterplot, on the other hand, is a graphical representation of the relationship between two continuous variables. It shows the relationship between the two variables by plotting data points on a two-dimensional graph, where each axis represents one of the variables. The position of each data point on the graph indicates the value of the two variables for that particular case. A scatterplot can provide insight into the strength and direction of the relationship between the two variables.

So, a contingency table is useful for nominal and ordinal variables, but not for quantitative variables. For quantitative variables, a scatterplot is more appropriate.

Scatter plot displays relation between two quantitative variables exploratory variable will be in X axis and Response variable will be in y axis.

So, we can display relationships between two variables by means of tables and graphs. When the variables in a study are measured on a nominal or ordinal level we use a contingency table and when they are measured on a quantitative level we use a scatterplot.

Pearson Correlation Coefficient or Pearson’s r : Simple Definition, Formula

Pearson’s r is a statistical measure used to quantify the strength and direction of the linear relationship between two continuous variables. It ranges from -1 to 1, where -1 indicates a perfect negative linear relationship, 0 indicates no linear relationship, and 1 indicates a perfect positive linear relationship. Pearson’s r can be calculated using the

Key Point for Correlation Coefficient

  • scatterplot shows at a glance the relationship between two quantitative variable if you plot independent variable on the horizontal x-axis and dependent variable on the vertical y-axis. But now the question is how strong is this correlation? Pearson’s r express the strength of the correlation.
  • One of the most important advantages of Pearson’s r is that it expresses the direction and strength of the linear correlation between two variables with a single number.
  • A positive Pearson’s r indicates that a correlation is positive, and a negative correlation indicates that it is negative. The size of r expresses how tightly the observations are clustered around the imaginary best-fitting straight line through the cloud of data.
  • Pearson’s r is always a number between -1 and 1. -1 refers to a perfect negative correlation. + 1 to a perfect positive correlation. And 0 means that there is no correlation is there.

How to compute the Pearson’s r

First change all original scores to z-scores. In other words, standardize the values. The reason is that we want the Pearson’s r to be a number between minus 1 and 1. If we don’t standardize, the measure of correlation will be expressed according to the original metrics. To standardize calculate mean and Standard deviation.

Here is the formula to compute Pearson’s R.

Now if you apply the above fomula to the last column then you will get Sum =2.78

r= 2.78 / 4-1

        = 0.93

What does it mean by r = 0.93?

It means there is strongly linear relationship between x and y.

Before going to calculate Pearson’s r first see the Scatterplot. If there is no linear relation then no Pearson’s r. See the below diagram it’s curvilinear relation so there is no strong Pearson’s r.

So, as a summary, A scatterplot helps us to broadly assess whether a correlation is strong or weak, but it does not tell us exactly how strong the relationship is. Pearson’s r is a measure that can show us exactly that.

 

Similar Terminology for Pearson’r

  • pearson correlation interpretation
  • sample research using pearson r
  • pearson correlation interpretation spss
  • pearson’s r-squared
  • pearson r meaning in research
  • research paper using pearson correlation

Z-scores

Basics of Regression