We asked a similar question somewhere else and someone advised trying here instead.
How should we calculate $\langle A\rangle \langle A\rangle$ from data on dipole moments? It is a term in an equation for calculating something else. Some example data:
x y z Total 26.78 -6.31 27.17 38.67 26.80 -5.79 27.33 38.72 26.75 -5.28 27.415 38.67 26.63 -4.79 27.41 38.52 26.45 -4.34 27.36 38.31
<> symbol means "average." On each row,
Total is the square root of the sum of squares of the
z. Each row is a new time.
It is part of an expression to calculate variance $\big(\langle A \cdot A\rangle - \langle A\rangle \langle A\rangle\big)$. We are confused because someone has suggested that
np.var(Total) from Python or a corresponding function from Matlab are not the way to calculate it because they eliminate any negative signs on component values and make $\langle A\rangle \langle A\rangle$ too large.
Is this true? Should we use
np.mean(x)**2+np.mean(y)**2+np.mean(z)**2 for $\langle A\rangle \langle A\rangle$ instead?