I would like to calculate the correlations between ambient light measurements and the daytime. The ambient light is measured by a smartphone light sensor and is a continuous variable (basically, it is not completely continuous because the light sensor provides integers but I'm averaging a sequence of values over a window). The daytime is an integer between 0 and 23.

What is the right correlation measure here?


1 Answer 1


If you really want a correlation measure then with a 0-23 scale I would say that you would be OK to use Pearson's.

However, I'm not sure that you should be looking for any correlation measure here. Correlation is a measure of linear association. If I have understood the question, then it is seems likely that you are dealing with a non-linear association. The time variable goes from 0 to 23, but the ambient measure presumably increases and then decreases. Correlation will not capture that.

I would suggest a different approach, that of regression. For example you could consider ambient light as the dependent variable, and hour of day as the independent variable. You could then allow for nonlinearity by introducing a non-linear term such as a quadratic. This is only an example, the subject domain knowledge would presumably offer some insight as to the actual nonlinear asociation to use.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.