Hello,
I'm not sure of your exact application, but what I think you want to do is compute the probability values as numbers using your equation. Then map results to colors and draw the colors, rather than by trying to use the pixel values of the colors to compute your results.
Barry.