Correlation vs Chi Square
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
add a comment |
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
add a comment |
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
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 3 hours ago
Ben
24229
24229
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
add a comment |
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)
New contributor
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
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
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.
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
add a comment |
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.
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
add a comment |
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.
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 2 hours ago
Peter Flom♦
74.3k11105202
74.3k11105202
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
add a comment |
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
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?
– Ben
18 mins ago
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?
– Ben
18 mins ago
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.
– Peter Flom♦
29 secs ago
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.
– Peter Flom♦
29 secs ago
add a comment |
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)
New contributor
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
add a comment |
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)
New contributor
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
add a comment |
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)
New contributor
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)
New contributor
New contributor
answered 2 hours ago
Dr. Ali
111
111
New contributor
New contributor
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
add a comment |
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
Thank you! Does that mean I cannot study the relationship between heart rate and blood pressure with chi square?
– Ben
21 mins ago
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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