title: Weka NaiveBayes Classifier giving different (wrong?) means/standard-deviation on numerical values
body: <p>I have tried to classify using both a NaiveBayes classifier and a NaiveBayesSimple classifier, using the following data:</p>
  
  <pre><code>@attribute a real
  @attribute b {yes, no}                                                                                        
  
  @data                                                                                                            
  1,yes
  3,yes
  5,yes
  2,yes
  1,yes
  4,no
  7,no
  5,no
  8,no
  9,no
  </code></pre>
  
  <p>When using the NaiveBayesSimple classifier, I get the mean and variance values I expect:</p>
  
  <pre><code>=== Classifier model (full training set) ===
  
  Naive Bayes (simple)
  
  Class yes: P(C) = 0.5       
  
  Attribute a
  Mean: 2.4           Standard Deviation: 1.67332005
  
  
  
  Class no: P(C) = 0.5       
  
  Attribute a
  Mean: 6.6           Standard Deviation: 2.07364414
  </code></pre>
  
  <p>However, when using the NaiveBayes classifier, I get different values:</p>
  
  <pre><code>=== Classifier model (full training set) ===
  
  Naive Bayes Classifier
  
              Class
  Attribute         yes     no
                  (0.5)  (0.5)
  =============================
  a
    mean          2.5143 6.6286
    std. dev.     1.3328 1.8286
    weight sum         5      5
    precision     1.1429 1.1429
  </code></pre>
  
  <p>I was wondering what the cause of the shifting mean/SD was? I've read through the paper that the NaiveBayes classifier is based on: <a href="http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.8.3257" rel="nofollow">http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.8.3257</a> and can't see any reason for it there.</p>
  
  <p>Thanks</p>