In a discussion, one claimed that because gender has only two categories, he can correlate it with a continuous variable. Is it acceptable to use Pearson correlation between one continuous and another  binary variable?
122346
I am trying to find the correlation between a dichotomous and a continuous variable.  From my ground work on this I found that I have to use independent t-test and the precondition for it is that the distribution of the variable has to be normal.  I performed Kolmogorov-Smirnov test for testing the normality and found that the continuous variable is non-normal and is skewed (for about 4,000 data points).   I did the Kolmogorov-Smirnov test for the entire range of variables. Should I split them into groups and do the test? I.e., say if I have risk level (0 = Not risky, 1 = Risky) and cholesterol levels, then should I:    Divide them into two groups, like  Risk level =0 (Cholestrol level) -&gt; Apply KS Risk level =1 (Cholestrol level) -&gt; Apply KS  Take them together and apply the test? (I performed it on the whole dataset only.)   After that, what test should I do if it is still non-normal?    EDIT: The above scenario was just a description I tried to provide for my problem. I have a dataset which contains more than 1000 variables and about 4000 samples. They are either continuous or categorical in nature. My task is to predict a dichotomous variable based on these variables (maybe come up with a logistic regression model). So I thought the initial investigation would involve finding the correlation between dichotomous and a continuous variable.  I was trying to see how the distribution of the variables are and hence tried to go to t-test. Here I found the normality as an issue. The  Kolmogorov-Smirnov test gave a significance value of 0.00 in most of these variables.  Should I assume normality here? The skewness and kurtosis of these variables also show that the data is skewed (>0) in almost all cases.  As per the note given below I will investigate the point-biserial correlation further. But about the distribution of variables I am still unsure.
50338
I'm struggling with my lab report. I have a questionnaire which contains Likert responses (1-7) as well as questions that require only yes or no answers. I want to see if there is a correlation between higher scores on the likert scale and responses to the binary answers to the other questions.   Specifically - the likert response is about anxiety levels. The binary (yes/no) answer is about negative consequences due to alcohol use. I want to just run the one ordinal likert item with all the negative consequence responses to see if there is a relationship. Can anyone help me?     Thanks so much for the fast comments. It definitely assures me that Spearman's Rho can be used but my main problem is the fact that i am mixing binary and ordinal variables together in the one correlation matrix.  I have one ordinal variable (anxiety - 1-7 on likert scale) crossed with 13 dichotomous (0 or 1 representing yes or no) to answers ("have you ever been hospitalised due to your alcohol use?). I get statistically significant answers (&lt;.05 and &lt; .01 but the Correlation coefficients are tiny (i.e o.2) at best.   the hospitalisation is the DV an the anxiety levels the IV.   I just think i'm doing something wrong here. should i collapse the 13 binary variables in to one some how?   i can't see how SPSS will recognise the values between 1-7 when correlating with binary answers. i keep thinking it will just read that there is something in that box (ordinal) but not recognise the value (i.e 1-7) . but people keep saying that SPSS does in fact recognise this difference and account for it.
35769
I have some pairs of datasets (n=200 or thereabouts), of samples which are non-negative and not normally distributed. I think these pairs of variables are related, probably linearly.   Calculating Spearman's rank correlation on these datasets gives some strange results. The correlation coefficients show that the pairs of variables are weakly, positively correlated (e.g. rho of around 0.4), but the p-values are very low (e.g. 4.1e-10).  My vague understanding of this is that the variables are weakly, positively correlated but the probability of unrelated variables producing the same correlation is very low. Does this mean we can be reasonably certain that a positive correlation exists or have I misunderstood?
113125
I have 2 time-series (both smooth) that I would like to cross-correlate to see how correlated they are.  I intend to use the Pearson correlation coefficient. Is this appropriate?  My second question is that I can choose to sample the 2 time-series as well as I like. i.e. I can choose how many data points I will us. Will this affect the correlation coefficient that is output? Do I need to account for this?  For illustration purposes  option(i)  [1,    4,    7,    10] &amp; [6,    9,    6,    9,    6]  option(ii)  [1,2,3,4,5,6,7,8,9,10] &amp; [6,7,8,9,8,7,6,7,8,9,8,7,6]
53766
Suppose we are dealing with this data set $(X_i, N_i)$ where $X_i$ is continuous variable (for example Exponential) and $N_i$ is discrete distribution (for example Poisson) for $i=1,...,n$. Let's say that $\rho$ is the correlation between $X$ and $N$. How can someone define $\rho$?
113798
I know that we can use Spearman rho to measure the correlation between numerical variables. But how to measure correlation between categorical variables?
34811
According to Yale:     Categorical variables represent types of data which may be divided into groups       To me, dates do not fit this definition. They are ordinal, as one date is bigger than the date before it. It is also quantitative as it can added, subtracted...etc.  I am interested in correlating these observations to other variables in a sample, so I wanted to perform pre-modelling analysis.  Is my understanding correct?  EDIT:  Thank you for your replies. The general consensus is that dates can either be considered binomial or count data according to these data-type characterisations:   I tried to fit the explanations in the comments to the data-types in wikipedia, but, it doesn't seem to fit what people actually mean, is I'll reread.  EDIT 2: To give context for the question: I am trying to measure the effect of various processes over time, and these effects may not be linear, but cyclical (e.g. the seasons). The observations have dates (dd/mm/yyyy), but the dates are only significant in relation to the other dates.
101517
Trying to find examples of discrete and continuous random variables that are dependent and uncorrelated.    For the continuous I take standard normal $X \sim N(0,1)$ and $Y=X^2$.  By symmetry it is clear that $E(XY) -E(X)E(Y) = E(X^3) - E(X)E(X^2) = 0 - (0)(1) = 0$, so uncorrelated.   But for events $A = \{0 &lt; X &lt; 1\}$ and $B = \{X^2 &gt; 1\}$, I see that $P(A \cap B) = 0$ which does not equal $P(A)P(B)$ since both $A$ and $B$ have nonzero probability. Thus, $X$ and $Y$ are dependent and uncorrelated.  Now I am having trouble constructing a simple example with discrete random variables.
1643
The Pearson correlation coefficient of x and y is the same, whether you compute pearson(x, y) or pearson(y, x). This suggests that doing a linear regression of y given x or x given y should be the same, but I don't think that's the case.   Can someone shed light on when the relationship is not symmetric, and how that relates to the Pearson correlation coefficient (which I always think of as summarizing the best fit line)?
43201
In linear models we need to check if a relationship exists among the explanatory variables. If they correlate too much then there is collinearity (i.e., the variables partly explain each other). I am currently just looking at the pairwise correlation between each of the explanatory variables.  Question 1: What classifies as too much correlation? For example, is a Pearson correlation of 0.5 too much?  Question 2: Can we fully determine whether there is collinearity between two variables based on the correlation coefficient or does it depend on other factors?  Question 3: Does a graphical check of the scatterplot of the two variables add anything to what the correlation coefficient indicates?
9426
To my understanding, "Control" can have two meanings in statistics.   Control group: In an experiment, no treatment is given to the member of the control group.  Ex: Placebo vs Drug: You give drugs to one group and not to the other (control),  which is also referred as "controlled experiment".  Control for a variable: Technique of separating out the effect of a particular independent variable. Some of the other names given to this techniques are, " accounting for", "holding constant", "controlling for", some variable.  For example: In a Football viewing study (like or not like),  you may want to take out the effect of gender as we think gender causes bias, that is, male may like it more than female.     So, my question is for point (2). Two questions:  How do you "control"/ "account for" variables, in general. What techniques are used? (In terms of regression, ANOVA framework).   In above example, does choosing male and female randomly constitutes control? That is, is "randomness" one of the techniques for controlling other effects?
27005
There are two Boolean vectors, which contain 0 and 1 only. If I calculate the Pearson or Spearman correlation, are they meaningful or reasonable?
118642
I'm looking to generate a set of 5 random variables and enforce a dependence structure between them and onto a dependent variable $Y$.  I understand how to generate correlated random variables for multivariate normal, but not when mixing different types.  Below is a little more than I need, but I'm hoping someone can give me a general way of solving this problem...   $X_1$ and $X_2$ need to be highly correlated Bernoulli variables.  $X_3$ needs to take one of 5 categorical values, call them "A"..."E".  $X_4$ needs to be normal, and negatively correlated with $X_1$, $X_2$.  $X_5$ needs to approximate test scores from $0$ to $100$ with a high skew, so gamma probably.  $X_5$ needs to be positively correlated with $X_1$, $X_2$, $X_4$.   Each of these variables must impact a "success/occurrence" Bernoulli distributed variable $Y$.  How would I begin?  I would like to enforce correlation both between the values of $X$, and also between each $X$ and $Y$.  (The categorical correlations seem particularly confusing to me.)
19394
I am building a classification model (let's say logistic regression) using 2 different data sets. The data sets do not come from the same population. Let's say the data sets comes from different space-time coordinates (Asia in Fall vs North America in Winter). I have been told that simply mixing the data sets into one and applying a classification model is not right (closest thing I understood was concerns around bias). Are there any techniques or models that I may use to analyze these 2 data sets as one? Note that the variables/features all align (including the target variable, which is binary).
28423
Binary data is often mentioned as a nominal sub-category, especially in such examples as female/male, smoker/non-smoker, etc. However, binary data with such values as pass/fail, correct/incorrect, absent/present, etc, seems to give some weight to its values. It's not like in the example of the gender, where both values are equal and differ primarily by the nominal and other context-related traits. Instead, this type of binary data clearly indicates that one value means something and the other means nothing.   In case of such distinction, can binary be considered ordinal? If yes, what are statistical tests that are usually used for such data? Also, are there any interesting books or papers on this case?
16252
I have some dependent variables related to the growth of a company having categories like (e.g. for variables indicating net profit, financial turnover etc.)   (1) decreasing,   (2) stable,   (3) increasing and   (4) rapidly increasing.  Now these variables are associated and ordinal in nature. I want to see the effect of a set of co-variates on these dependent variables. I understand that separate logistic regression will result in wrong formula of the variance and thus will produce wrong p-values. But what kind of regression should I run with more than one associated dependent categorical variables? Should that be a GEE model? Or anything else like multivariate regression (GLM)?   Can SPSS or R perform this?   Besides, I would like to have your suggestion regarding whether I should rather consider these variables as nominal and take "stable" as the reference category so that interpretations are more meaningful?  Kind regards.
121524
In my dataset we have both continuous and naturally discrete variables. I want to know whether we can do hierarchical clustering using both type of variables. And if yes, what distance measure is appropriate?