[Rd] Accuracy (PR#13867)

luethman at student.ethz.ch luethman at student.ethz.ch
Tue Aug 4 16:25:09 CEST 2009


Full_Name: Manuel Luethi
Version: 2.9.1
OS: Windows XP
Submission from: (NULL) (129.132.128.136)


Hi

I created the following vectors:

p_1=c(0.2,0.2,0.2,0.2,0.1,0.25,0.4,0.1,0.25,0.4,0.1,0.25,0.4,0.1,0.25,0.4,0.2,0.5,0.8,0.2,0.5,0.8,0.2,0.5,0.8,0.2,0.5,0.8)
p_2=c(0,0,0,0,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.4,0.25,0.1,0.4,0.25,0.1,0.4,0.25,0.1,0.4,0.25,0.1)

As these are probabilities, I calculated the remainder as

p_3=1-p_1-p_2

There the values which ought to be 0.1 were lateron not recognised by p_3==0.1,
but only if I used p_3 <= 0.1.

The full calculation is actually bigger but the core issue remains: I used
values input by hand, built a difference and it was wrong.

I know that exactly the value 0.1 is one that can not be represented using
binary rep. Maybe that's it, maybe not. Just wanted to let you know.

With kind regards

Manuel



More information about the R-devel mailing list