Original Post
Wasn't sure where to post this, but hopefully somebody here can help. In excel I have a series of 100 random numbers from 1 to 6 and the corresponding values for Y = 1000*X+100*X^0.5. In the table below I did a count of each occurrence to see if everything was working properly using Count=COUNTIF(Y1:Y100,Y)and I was getting a sum between 96 and 99 as opposed to 100. I figured that this was probably due to some sort of rounding error.
X P(x) Y Count
1 0.05 1100.000 5
2 0.20 2141.421 18
3 0.20 3173.205 15
4 0.25 4200.000 28
5 0.20 5223.607 22
6 0.10 6244.949 9
Sum: 97
I tried to replace the function with Count=COUNTIF(ROUND(Y1:Y100,0),ROUND(Y,0)) to eliminate that problem but it will not let me because it says there is an error. I'm not sure what the problem is with that function, can you guys see anything wrong with it or is this excels fault? To continue to check if it was in fact some problem with rounding when using very precise numbers I used ROUND(Y,-1) for all my values and then compared them and I am still getting sums between 96 and 99. I am really confused as to why this is happening, maybe I am missing something obvious, I don't know. Can any of you guys help me out with this?