Correlation vs Chi Square
Clash Royale CLAN TAG#URR8PPP
$begingroup$
Up to now I used correlations to study whether two variables are affected by each other. Now I stumbled over the case that the chi square is doing that too ( http://www.r-tutor.com/elementary-statistics/goodness-fit/chi-squared-test-independence ).
Where's the difference respectively which one is more suitable?
In the same context I found https://www.rdocumentation.org/packages/mvoutlier/versions/2.0.9/topics/chisq.plot where "the ordered robust mahalanobis distances of the data against the quantiles of the Chi-squared distribution" is plotted.
This is now very confusing as I'm used to apply the Mahalanobis distance to measure similarities. And now it is connected with chi square.
Can you please help me to separate them?
correlation chi-squared
$endgroup$
add a comment |
$begingroup$
Up to now I used correlations to study whether two variables are affected by each other. Now I stumbled over the case that the chi square is doing that too ( http://www.r-tutor.com/elementary-statistics/goodness-fit/chi-squared-test-independence ).
Where's the difference respectively which one is more suitable?
In the same context I found https://www.rdocumentation.org/packages/mvoutlier/versions/2.0.9/topics/chisq.plot where "the ordered robust mahalanobis distances of the data against the quantiles of the Chi-squared distribution" is plotted.
This is now very confusing as I'm used to apply the Mahalanobis distance to measure similarities. And now it is connected with chi square.
Can you please help me to separate them?
correlation chi-squared
$endgroup$
add a comment |
$begingroup$
Up to now I used correlations to study whether two variables are affected by each other. Now I stumbled over the case that the chi square is doing that too ( http://www.r-tutor.com/elementary-statistics/goodness-fit/chi-squared-test-independence ).
Where's the difference respectively which one is more suitable?
In the same context I found https://www.rdocumentation.org/packages/mvoutlier/versions/2.0.9/topics/chisq.plot where "the ordered robust mahalanobis distances of the data against the quantiles of the Chi-squared distribution" is plotted.
This is now very confusing as I'm used to apply the Mahalanobis distance to measure similarities. And now it is connected with chi square.
Can you please help me to separate them?
correlation chi-squared
$endgroup$
Up to now I used correlations to study whether two variables are affected by each other. Now I stumbled over the case that the chi square is doing that too ( http://www.r-tutor.com/elementary-statistics/goodness-fit/chi-squared-test-independence ).
Where's the difference respectively which one is more suitable?
In the same context I found https://www.rdocumentation.org/packages/mvoutlier/versions/2.0.9/topics/chisq.plot where "the ordered robust mahalanobis distances of the data against the quantiles of the Chi-squared distribution" is plotted.
This is now very confusing as I'm used to apply the Mahalanobis distance to measure similarities. And now it is connected with chi square.
Can you please help me to separate them?
correlation chi-squared
correlation chi-squared
asked Jan 2 at 12:20
BenBen
25429
25429
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
First, in your opening sentence, "affected by" should be "linearly related to". Two variables can be correlated and have not the slightest causal relationship and correlation does not measure all relationships, just linear ones (either on the quantities themselves (Pearson) or their ranks (Spearman)).
So, correlation is about the linear relationship between two variables. Usually, both are continuous (or nearly so) but there are variations for the case where one is dichotomous.
Chi-square is usually about the independence of two variables. Usually, both are categorical. In your first link, the two variables are smoking and exercise and both are measured ordinally - not in terms of number of cigarettes or minutes of exercise, for example. (Incidentally, I would prefer using a test that captured the ordinal nature of the variables, I don't think this is the best example of chi-square).
Your second link is a fairly specialized use of chi-square - it looks like it's an attempt to find multivariate outliers by comparing Mahlanobis distance to what their distribution should be, in the absence of outliers. I would leave that aside while you learn the basics of chi-square.
$endgroup$
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
add a comment |
$begingroup$
generally, Chi square is a non-parametric test that is used to show association between two qualitative variables (like gender and eye color) ; while correlation (Pearson coefficient) is used to test the correlation between two quantitative variables (like heart rate and blood pressure)
$endgroup$
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "65"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f385279%2fcorrelation-vs-chi-square%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
First, in your opening sentence, "affected by" should be "linearly related to". Two variables can be correlated and have not the slightest causal relationship and correlation does not measure all relationships, just linear ones (either on the quantities themselves (Pearson) or their ranks (Spearman)).
So, correlation is about the linear relationship between two variables. Usually, both are continuous (or nearly so) but there are variations for the case where one is dichotomous.
Chi-square is usually about the independence of two variables. Usually, both are categorical. In your first link, the two variables are smoking and exercise and both are measured ordinally - not in terms of number of cigarettes or minutes of exercise, for example. (Incidentally, I would prefer using a test that captured the ordinal nature of the variables, I don't think this is the best example of chi-square).
Your second link is a fairly specialized use of chi-square - it looks like it's an attempt to find multivariate outliers by comparing Mahlanobis distance to what their distribution should be, in the absence of outliers. I would leave that aside while you learn the basics of chi-square.
$endgroup$
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
add a comment |
$begingroup$
First, in your opening sentence, "affected by" should be "linearly related to". Two variables can be correlated and have not the slightest causal relationship and correlation does not measure all relationships, just linear ones (either on the quantities themselves (Pearson) or their ranks (Spearman)).
So, correlation is about the linear relationship between two variables. Usually, both are continuous (or nearly so) but there are variations for the case where one is dichotomous.
Chi-square is usually about the independence of two variables. Usually, both are categorical. In your first link, the two variables are smoking and exercise and both are measured ordinally - not in terms of number of cigarettes or minutes of exercise, for example. (Incidentally, I would prefer using a test that captured the ordinal nature of the variables, I don't think this is the best example of chi-square).
Your second link is a fairly specialized use of chi-square - it looks like it's an attempt to find multivariate outliers by comparing Mahlanobis distance to what their distribution should be, in the absence of outliers. I would leave that aside while you learn the basics of chi-square.
$endgroup$
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
add a comment |
$begingroup$
First, in your opening sentence, "affected by" should be "linearly related to". Two variables can be correlated and have not the slightest causal relationship and correlation does not measure all relationships, just linear ones (either on the quantities themselves (Pearson) or their ranks (Spearman)).
So, correlation is about the linear relationship between two variables. Usually, both are continuous (or nearly so) but there are variations for the case where one is dichotomous.
Chi-square is usually about the independence of two variables. Usually, both are categorical. In your first link, the two variables are smoking and exercise and both are measured ordinally - not in terms of number of cigarettes or minutes of exercise, for example. (Incidentally, I would prefer using a test that captured the ordinal nature of the variables, I don't think this is the best example of chi-square).
Your second link is a fairly specialized use of chi-square - it looks like it's an attempt to find multivariate outliers by comparing Mahlanobis distance to what their distribution should be, in the absence of outliers. I would leave that aside while you learn the basics of chi-square.
$endgroup$
First, in your opening sentence, "affected by" should be "linearly related to". Two variables can be correlated and have not the slightest causal relationship and correlation does not measure all relationships, just linear ones (either on the quantities themselves (Pearson) or their ranks (Spearman)).
So, correlation is about the linear relationship between two variables. Usually, both are continuous (or nearly so) but there are variations for the case where one is dichotomous.
Chi-square is usually about the independence of two variables. Usually, both are categorical. In your first link, the two variables are smoking and exercise and both are measured ordinally - not in terms of number of cigarettes or minutes of exercise, for example. (Incidentally, I would prefer using a test that captured the ordinal nature of the variables, I don't think this is the best example of chi-square).
Your second link is a fairly specialized use of chi-square - it looks like it's an attempt to find multivariate outliers by comparing Mahlanobis distance to what their distribution should be, in the absence of outliers. I would leave that aside while you learn the basics of chi-square.
answered Jan 2 at 13:33
Peter Flom♦Peter Flom
74.7k11107204
74.7k11107204
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
add a comment |
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
Thank you! For a deeper understanding: When two variables are correlated, then there should be a relationship between both or not? Maybe not linear but there must be one? And "independency" is the same as "no relationship", correct?
$endgroup$
– Ben
Jan 2 at 15:50
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
$begingroup$
When two variables are correlated, there is a linear relationship between them. However, you can have a nonlinear relationship where correlation is close to 0.
$endgroup$
– Peter Flom♦
Jan 2 at 16:08
add a comment |
$begingroup$
generally, Chi square is a non-parametric test that is used to show association between two qualitative variables (like gender and eye color) ; while correlation (Pearson coefficient) is used to test the correlation between two quantitative variables (like heart rate and blood pressure)
$endgroup$
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
add a comment |
$begingroup$
generally, Chi square is a non-parametric test that is used to show association between two qualitative variables (like gender and eye color) ; while correlation (Pearson coefficient) is used to test the correlation between two quantitative variables (like heart rate and blood pressure)
$endgroup$
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
add a comment |
$begingroup$
generally, Chi square is a non-parametric test that is used to show association between two qualitative variables (like gender and eye color) ; while correlation (Pearson coefficient) is used to test the correlation between two quantitative variables (like heart rate and blood pressure)
$endgroup$
generally, Chi square is a non-parametric test that is used to show association between two qualitative variables (like gender and eye color) ; while correlation (Pearson coefficient) is used to test the correlation between two quantitative variables (like heart rate and blood pressure)
answered Jan 2 at 13:08
Dr. AliDr. Ali
111
111
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
add a comment |
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
$endgroup$
– Ben
Jan 2 at 15:47
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
$begingroup$
yes unless you change the data into quantitative
$endgroup$
– Dr. Ali
Jan 2 at 19:20
add a comment |
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f385279%2fcorrelation-vs-chi-square%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown