I am certainly going to make a mess of any serious algebraic terminology, so bear with me as I present my problem arising from a probability problem.

Consider the space of sequences of $n$ zero-one valued bits -- that is, $\mathbb{Z}_2^n$. For any element $\omega = (\omega_1,\omega_2,\ldots,\omega_n)$ we can of course define $|\omega|$ to be the number of $i$ such that $\omega_i = 1$. In some sense, $|\omega| = \sum_i \omega_i$.

Now define the function $f: \mathbb{Z}_2^n \to \mathbb{R^{\geq 0}}$ by $f(\omega) = 1_{|\omega|>0}\frac{1}{|\omega|^2} = 1_{|\omega|>0}\left(\sum_{i,j} \omega_i\omega_j\right)^{-1}$. If you accept that last equality, this is very nearly a second-degree rational function, except for at $\omega=(0,0,\ldots,0)$, where we define it to be zero.

Now, this function $f$ can be written as a polynomial -- this is clear just by polynomial interpolation, and there only being a finite number of points in $\mathbb{Z}_2^n$ to fit the polynomial at. I am interested in what the coefficients of this polynomial are -- these are also the Fourier coefficients of $f$ when we endow $\mathbb{Z}_2^n$ with the uniform probability measure, so it is a natural thing to want.

The remark about Fourier coefficients does give one expression for the coefficients of this polynomial as an expectation (inner product of the function with the characters), specifically if we take $X_i$ to be iid uniform on $\{-1,1\}$, we have $$\hat{f}(S) = \mathbb{E}\left[1_{\sum_i X_i+1 > 0}\frac{\prod_{i\in S} X_i}{\left(\sum_i \frac{X_i +1}{2}\right)^2}\right]$$

Unfortunately, it isn't clear to me how to compute that expectation.

So I was hoping that there was some other approach -- I know there has been a lot of work on computing things in algebraic geometry, and this question involves enough polynomials and finite fields that it might be relevant. But the sum total of my knowledge of algebraic geometry is half a master's class several years ago, so I have no idea if it actually is. Thus I am asking here, to see if the problem has already been solved somewhere.