Re: [libreoffice-users] VAR, STDEV, CHISQ.INV

2015-07-09 Thread Rui Pedro Caldeira
Thank you for all your help!

My best,
Rui

Cumprimentos,
Rui Pedro Caldeira

On Thu, Jul 9, 2015 at 11:15 AM, Rob Jasper r...@famjasper.nl wrote:

 Joel,

 just read the MS-Excel explanation you are referring to. Great explanation.
 Thanks for pointing to this.

 Rob.

 On 8 jul. 2015, at 20:42, Joel Madero wrote:

  Sounds to me like normal floating number behavior. I know someone is
 trying
  to document this and explain why it happens (it's a technical reason that
  goes beyond my skills) but this seems entirely normal behavior given the
  constraints of programming languages generally and hardware in
 particular.
 
 
  Best,
  Joel
 
  P.S. You can see similar issues in other spreadsheet software. This seems
  to give some indication as to the reasons why:
  https://support.microsoft.com/en-us/kb/78113 (yes I know it's MSO
  link...just explaining the reason why floating number isn't entirely
  accurate all the time)
 
  On Wed, Jul 8, 2015 at 11:33 AM, Rui Pedro Caldeira 
 rpcalde...@outlook.com
  wrote:
 
  Hey and thanks for your fast answer. This is the data set:
 
   0.01  0.01  0.01  0.01  0.01  0.01  0.01
  0.01  0.01  0.01  0.01  0.01  0.01  0.01
  0.02  0.03  0.97  0.97  0.97  0.97  0.98
  1.01  1.97
 
  Using the formula in the spreadsheet it gives the value: 0.328061419
 (VAR)
  and 0.5727664611 (STDEV)
 
 
  And yes, i do mean CHISQ.INV :)
 
  Thanks, Rui.
 
  Cumprimentos,
  Rui Pedro Caldeira
 
  On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker b.m.bar...@btinternet.com
 
  wrote:
 
  At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote:
 
  I'm having some problems with the VAR and STDEV function, when
 executing
  these lines of code. The average is well calculated but the remaining
  two
  return very low, unrealistic and equal values (6.93018471335974E-310).
 
 
  That value is 2^-1027 - which is probably the smallest floating-point
  value your system can represent without underflow.
 
  Have you compared the results produced from your data by equivalent
  normal
  formulae in a spreadsheet cell?
 
  Do you mean CHISQ.INV and not CHISQINV?
 
  Brian Barker
 
  --
  To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
  Problems?
  http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
  Posting guidelines + more:
 http://wiki.documentfoundation.org/Netiquette
  List archive: http://listarchives.libreoffice.org/global/users/
  All messages sent to this list will be publicly archived and cannot be
  deleted
 
 
 
  --
  To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
  Problems?
  http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
  Posting guidelines + more:
 http://wiki.documentfoundation.org/Netiquette
  List archive: http://listarchives.libreoffice.org/global/users/
  All messages sent to this list will be publicly archived and cannot be
  deleted
 
 
 
 
  --
  *Joel Madero*
  LibreOffice QA Volunteer
  jmadero@gmail.com
 
  --
  To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
  Problems?
 http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
  Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
  List archive: http://listarchives.libreoffice.org/global/users/
  All messages sent to this list will be publicly archived and cannot be
 deleted



-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] VAR, STDEV, CHISQ.INV

2015-07-08 Thread Rui Pedro Caldeira
Hey and thanks for your fast answer. This is the data set:

  0.01  0.01  0.01  0.01  0.01  0.01  0.01
0.01  0.01  0.01  0.01  0.01  0.01  0.01
0.02  0.03  0.97  0.97  0.97  0.97  0.98
1.01  1.97

Using the formula in the spreadsheet it gives the value: 0.328061419 (VAR)
and 0.5727664611 (STDEV)


And yes, i do mean CHISQ.INV :)

Thanks, Rui.

Cumprimentos,
Rui Pedro Caldeira

On Wed, Jul 8, 2015 at 7:24 PM, Brian Barker b.m.bar...@btinternet.com
wrote:

 At 18:44 08/07/2015 +0100, Rui Pedro Caldeira wrote:

 I'm having some problems with the VAR and STDEV function, when executing
 these lines of code. The average is well calculated but the remaining two
 return very low, unrealistic and equal values (6.93018471335974E-310).


 That value is 2^-1027 - which is probably the smallest floating-point
 value your system can represent without underflow.

 Have you compared the results produced from your data by equivalent normal
 formulae in a spreadsheet cell?

 Do you mean CHISQ.INV and not CHISQINV?

 Brian Barker

 --
 To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
 Problems?
 http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
 Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
 List archive: http://listarchives.libreoffice.org/global/users/
 All messages sent to this list will be publicly archived and cannot be
 deleted



-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


[libreoffice-users] VAR, STDEV, CHISQ.INV

2015-07-08 Thread Rui Pedro Caldeira
Hello guys, I’m having some problems with the VAR and STDEV function, when
executing these lines of code. The average is well calculated but the
remaining two return very low, unrealistic and equal values
(6.93018471335974E-310).

To add to a bad situation, I can’t execute the function CHISQINV as stated
in the second code box below. It gives out the error:

BASIC runtime error.
An exception occurred
Type: com.sun.star.lang.IllegalArgumentException
Message: .

Any help is deeply appreciated!

Thanks,
Rui

== CODE BLOCK 1 ==oRange =
xSheet.getCellRangeByPosition(7, 1,  7, rangeLim)'Media (funciona)
average = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE)
print average'Variancia (ver)
variance = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.VAR)
print variance'StdDev (ver)
stdDev = oRange.computeFunction(com.sun.star.sheet.GeneralFunction.STDEV)
print stdDev

== CODE BLOCK 2 ==
function CHISQINV (erro, degree)dim oFunction as variant
oFunction = createUnoService(com.sun.star.sheet.FunctionAccess)
dim aArgument(1 to 2) as variant
dim result as doubleaArgument(1)=erro
aArgument(2)=degree result = oFunction.callFunction(CHISQ.INV,
aArgument())CHISQINV = resultend function

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted