bug-gnu-pspp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: [bug #50366] calculation of variance under frequencies only gi


From: anonymous
Subject: PSPP-BUG: [bug #50366] calculation of variance under frequencies only give mean
Date: Tue, 21 Feb 2017 07:42:52 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

URL:
  <http://savannah.gnu.org/bugs/?50366>

                 Summary: calculation of variance under frequencies only give
mean
                 Project: PSPP
            Submitted by: None
            Submitted on: Tue 21 Feb 2017 12:42:50 PM UTC
                Category: Numerical Errors
                Severity: 5 - Average
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

data list list /forename (A12) height.
begin data.
Ahmed 188
bertram 167
Catherine 134.231
David 109.1
end data

Descriptives variables = height
  /statistics = variance.

* output.
* variable N Variance 
* height   4 1217.92 .

Frequencies variables = height
  /statistics = variance.

* output.
* N Valid    4 .
*   Missing  0 .
* Mean      149.58 .

* Bugs, the result of Frequencies for statistis
* should be a Variance
* but came out a Mean value

I finally found in src/langauge/stats/frequencies.c

              else if (lex_match_id (lexer, "VARIANCE"))
                {
                  frq.stats |= BIT_INDEX (FRQ_ST_MEAN);
change to:
 else if (lex_match_id (lexer, "VARIANCE"))
                {
      frq.stats |= BIT_INDEX (FRQ_ST_VARIANCE);

will fix the bug. Thanks






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50366>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]