Package: gnumeric
Version: 1.7.91-1.1
Severity: normal
Hello,
When running a paired t-test, several of the outputs failed. This
turned out to be due to the two selected cell ranges being subtracted
rather than compared (i.e. you had RANGE1 - RANGE2 rather than RANGE1,
RANGE2) in the function call. This happened for the Observed Mean
Difference, Variance of the Differences, and df, but not for the Pearson
Correlation (which also requires two cell ranges rather than one).
I've attached a patch that fixes this problem for the Observed Mean
Difference when doing the paired t-test. I basically copied the way that
the Pearson Correlation calculation was done. I'm happy to do the same fix
for the other broken functions if this is indeed the correct fix, but I'm
not sure about it because the way it's written does appear to be
deliberate, even if I can't make heads or tails of it. I don't know if this
affects other tests as well, but I can check if it's desired. Thanks!
- David Nusinow
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.23-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnumeric depends on:
ii debconf [debc 1.5.17 Debian configuration management sy
ii gconf2 2.20.1-2 GNOME configuration database syste
ii gnumeric-comm 1.7.91-1.1 spreadsheet application for GNOME
ii gsfonts 1:8.11+urwcyr1.0.7~pre43-1 Fonts for the Ghostscript interpre
ii libatk1.0-0 1.20.0-1 The ATK accessibility toolkit
ii libbonobo2-0 2.20.2-1 Bonobo CORBA interfaces library
ii libbonoboui2- 2.20.0-1 The Bonobo UI library
ii libc6 2.7-4 GNU C Library: Shared libraries
ii libcairo2 1.4.12-1 The Cairo 2D vector graphics libra
ii libgconf2-4 2.20.1-2 GNOME configuration database syste
ii libglade2-0 1:2.6.2-1 library to load .glade files at ru
ii libglib2.0-0 2.14.4-2 The GLib library of C routines
ii libgnome2-0 2.20.1.1-1 The GNOME 2 library - runtime file
ii libgnomeui-0 2.20.1.1-1 The GNOME 2 libraries (User Interf
ii libgnomevfs2- 1:2.20.1-1 GNOME Virtual File System (runtime
ii libgoffice-0- 0.5.4-1 Document centric objects library -
ii libgsf-1-114 1.14.7-2 Structured File Library - runtime
ii libgtk2.0-0 2.12.3-2 The GTK+ graphical user interface
ii libpango1.0-0 1.18.3-1 Layout and rendering of internatio
ii libxml2 2.6.30.dfsg-3 GNOME XML library
ii procps 1:3.2.7-5 /proc file system utilities
ii zlib1g 1:1.2.3.3.dfsg-8 compression library - runtime
Versions of packages gnumeric recommends:
ii evince 2.20.2-1 Document (postscript, pdf) viewer
-- debconf information:
gnumeric/existing-process: false
Index: gnumeric-1.7.91/src/tools/analysis-tools.c
===================================================================
--- gnumeric-1.7.91.orig/src/tools/analysis-tools.c 2007-12-17 18:03:50.000000000 -0500
+++ gnumeric-1.7.91/src/tools/analysis-tools.c 2007-12-17 18:04:38.000000000 -0500
@@ -1860,8 +1860,9 @@
/* Observed Mean Difference */
expr_diff = gnm_expr_new_binary (expr_1, GNM_EXPR_OP_SUB, expr_2);
dao_set_cell_expr (dao, 1, 6,
- gnm_expr_new_funcall1 (fd_mean,
- gnm_expr_copy (expr_diff)));
+ gnm_expr_new_funcall2 (fd_mean,
+ gnm_expr_copy (expr_1),
+ gnm_expr_copy (expr_2)));
/* Variance of the Differences */
dao_set_cell_expr (dao, 1, 7,