# Is it OK to calculate correlation between $x$ and $\frac{y}{x}$?

I have a set of data that looks at individual decisions on an application, and whether or not that particular decision was flagged or not, aggregated by week. My three variables are week, decisions, flags.

My theory is that the more decisions there are, the higher the relative percentage of flagged decisions.

It's obvious that when I have a higher volume of decisions, I will have a higher volume of flags. So I've created a variable called flags per decision to help judge if the frequency of flag increases as decisions increase.

When I plot flags per decision against the number of decisions in that week, I see a moderate linear relationship.

I'm wondering if it's correct to deduce a correlation based on the new measure flags per decision and the number of decisions. Can I still use simple statistical functions such as Pearson's $r$ to calculate the correlation? Are there any caveats I need to watch out for when working in this way?

• Essentially you are fine. You should just watch out for the fact that flags per decision is between zero and one; for example, a simple regression model for flags per decision might not be a good idea. I also edited your title trying to better reflect the actual problem; feel free to undo the edit if you dislike it. – Richard Hardy Jan 16 '16 at 10:59
• If you asssume a linear relationship between $\frac{y}{x}$ and $x$ then you are assuming that there is a quadratic relationship between $y$ and $x$. Indeed, if $\frac{y}{x}=\beta_0 + \beta_1 x$ then $y=\beta_0 x + \beta_1 x^2$. – user83346 Jan 16 '16 at 13:18

Essentially you are fine. You should just watch out for the fact that flags per decision is between zero and one; for example, a simple regression model for flags per decision might not be a good idea.
Also note that assuming a linear relationship between $y/x$ and $x$ then you are assuming a quadratic relationship between $y$ and $x$. Doing the algebra: $$\frac{y}{x} = \beta_0 + \beta_1 x + \epsilon$$ then multiplying through by $x$: $$y = \beta_0 x + \beta_1 x^2 + \epsilon \cdot x$$ where I have added an error term $\epsilon$ (which with data needs an index $i$). So, if you think of fitting a model, then you should think about if the variance of the error term is constant for modelling $y$ or for modelling $y/x$.