How to calculate the expected value for each value in random values

52 Views Asked by At

I am applying the following equation in my PhD project to calculate the correlation between different random values (i.e., we call these values as fitness values):

enter image description here

Let's assume we have the following values: 5.8 - 15.8 - 10.9 - 62.12 - 79.2 - 49.6

t in the equation means the position of the value, for example, when the value of t=1 is 5.8

s is the number of steps which means that when t=1 and s=1 then we are pointing to the value that is one step away from 5.8 which is 15.8

My question is that how to calculate the expected value of ft and the expected value of ft+s? I couldn't understand how to get the expected values of these two values?

1

There are 1 best solutions below

5
On BEST ANSWER

It means that depending on $s$ you would have a different coefficient of correlation. I'm not sure for your example, but I met this when computing the empirical autocorrelation function for time series:

\begin{equation} r_h = \frac{1}{T}\sum_{t = h+1}^T(\frac{y_{t-h} - \bar{y}}{s_y})\times(\frac{y_{t} - \bar{y}}{s_y}) \end{equation}

for your case i.e. if $h = 1$

r <- c(5.8, 15.8, 10.9, 62.12, 79.2, 49.6)
sum(((r[-6] - mean(r)) / sd(r))*((r[-1] - mean(r))/sd(r)))/6 = 0.38

Or you can use ACF function in R.