Does adding a random number to my data make it secure? Say I have some real valued data that i want to keep secure. Now I have to pass on some modified version of the data to a second party for some computation, but i do not wish to reveal my data to the other party. If I add a value generated by a pseudo-random generating function to my data and then pass it on, does my data stay secure?
Yes, adding a secret random value $r$ to secret data $s$ and publishing the result $t=r+s$ can leave $s$ confidential; not perfectly so, but arbitrarily close to perfectly.

How much information leaks about $s$ from revealing $t$ depends on the assumed distribution of $r$ and $s$. For example, if $s$ is assumed to be chosen in $\{0,1\}$, and we chose $r$ uniformly randomly in $\{0,\;1,\dots,\;2^{128}-3,\;2^{128}-2\}$, then $t$ fits a 128-bit bitstring. It $t$ is $0$ or $2^{128}-1$, then the adversary has learned $s$ with certainty, but that's unlikely: probability about (just above) $2^{-127}$ for any distribution of $s$, or about $2^{-128}$ if $s$ is chosen by fair coin toss. And in other cases, the adversary has learned nothing about $s$.

More generally, if $s$ is an $m$-bit integer and $r$ is a uniformly random $n$-bit integer, then probability that the adversary learns anything about $s$ from $t$ is at worst about $2^{n-m-1}$ when that's small.

Other distributions of $r$ allow $t$ to use much less bits, without increasing the probability that an adversary learns $s$ with sizable probability, but trade this against more often revealing a little about $s$.



The question mentions that it should still be possible to perform some computation about $s$ from the masked $t$. That holds for addition at least. For example we can perform $t_i=s_i+r_i$ for several secret $s_i$, and the $r_i$ generated pseudo-randomly from a key $K$ and $i$ (using some PRF such as HMAC). $\sum t_i$ then allows to find $\sum s_i$ for one knowing $K$.