# Is there a way to combine frequency and magnitude into a single variable?

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?

• The questi9on is too abstract. With some context, maybe ... Commented Jul 18, 2022 at 20:00
• by frequency, you mean the number of measurements? Commented Jul 19, 2022 at 13:05
• @rep_ho yes number of measurements Commented Jul 19, 2022 at 13:50

I think one way would assign a Beta(count_of_true, count_of_false). I think that it would work because it get in account both the rate of trues as well the number of samples. And is possible to assess the confidence in those estimates. Another way would be use some kind of smoothing, for example:
• It looks like beta is a function of three parameters, 2 shape parameters and an $x \in {0, 1}$. Are you saying count_of_true and count_of_false are the shape parameters and $x$ would be the frequency? Commented Jul 19, 2022 at 14:22