bugGNU Octave - Bugs: bug #30905, Var sample size normalisation...

 
 

bug #30905: Var sample size normalisation default incorrect

Submitted by:  Nicholas Holmes <npholmes>
Submitted on:  Mon 30 Aug 2010 10:21:17 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: Jaroslav Hajek <highegg>
Originator Name: Nicholas HolmesOpen/Closed: Closed
Release: 3.2.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 30 Aug 2010 03:07:06 PM UTC, comment #3:

This problem has been fixed in the repository
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/NaN/inst/var.m?r1=6294&r2=6295&

and is included in the NaN-toolbox 2.0.4 release and later.

Unfortunately, it did not make it yet into Debian/Ubuntu.

The latest version of the NaN-toolbox is available from here:
http://biosig-consulting.com/matlab/NaN/

Alois

Alois Schlögl <schloegl>
Mon 30 Aug 2010 01:47:13 PM UTC, comment #2:

hi, it gives:

`var' is a function from the file /usr/share/octave/packages/3.2/nan-1.0.9/var.m

after removing the octave-nan package, it works fine, so i guess the problem is in there,

thanks, nick

Nicholas Holmes <npholmes>
Mon 30 Aug 2010 12:48:30 PM UTC, comment #1:

I can't confirm this neither in current sources nor 3.2.x; in both cases var gives the correct result. What does `which var' tell you?

Jaroslav Hajek <highegg>In charge of this item.
Mon 30 Aug 2010 10:21:17 AM UTC, original submission:

the function var should default to var(x,0) (normalising by N-1) when the second argument is missing, but it seems to default to var(x,1) (normalising by N), opposite to Matlab and the Octave help text, and opposite to the std function.

Thus,
x=1:10;

var(x) = 8.25
var(x,0)= 9.167
var(x,1)= 8.25

whereas:

std(x) = 3.0277
std(x,0)= 3.0277
std(x,1)= 2.8723

I'm using QtOctave & Octave 3.2.3-1 in Ubuntu 10.04 LTS

cheers,
nick

Nicholas Holmes <npholmes>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by schloegl (Posted a comment)
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by npholmes (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Aug 2010 06:21:45 AM UTChigheggStatusNone=>Invalid
      Assigned toNone=>highegg
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1