I have some data where I observe something at a certain frequency each month. Each time I observe, I count a value of 1 if true or 0 if false. The data looks like this:
Date, freq, count_of_true
2021-12-01, 10, 4
2021-11-01, 20, 14
2021-10-01, 50, 30
I want to use the monthly count_of_true as an independent variable to check for correlation with a un-described dependent variable. But, count_of_true is a function of frequency (and other factors).
I could check correlation using a new variable: true_rate = count_of_true / freq
. But true_rate does not take into account magnitude.
Is there a known way to create a variable that considers frequency and magnitude at the same time? For example, some popular formula which might use the Z-score of frequency variable as a weight which scales magnitude variable?