# patch #9032: New function binotest for statistics package

 Submitted by: Andreas Stahel Submitted on: Fri 17 Jun 2016 03:14:52 PM UTC Category: Forge : new function Priority: 5 - Normal Status: Done Privacy: Public Assigned to: None Open/Closed: Closed

You are not logged in

Fri 30 Mar 2018 05:44:36 AM UTC, comment #5:

Closing as done with

Mike Miller <mtmiller>
Wed 14 Dec 2016 12:08:24 PM UTC, comment #4:

Works in Octave 4.2.0

Armin MÃ¼ller <arm_in>
Tue 28 Jun 2016 09:33:21 PM UTC, comment #3:

Thanks, I put in some test cases and added it to the repository

Nir Krakauer <nir_krakauer>
Tue 28 Jun 2016 09:36:58 AM UTC, comment #2:

Hello Nir

Thank you for the excellent suggestions. I tried to implement those. Please examine the enclosed new version.

Enjoy the day

Andreas

Andreas Stahel <sha1>
Fri 24 Jun 2016 03:49:35 PM UTC, comment #1:

Hi Andreas,

This is a nice contribution, but I see a few problems:

1) Computed two-tailed p values can be > 1, for example
[h, p, ci] = binotest (7,14,0.5)
with p = 1.2095

2) There is an error when pos == 0 or pos == n, for example
[h, p, ci] = binotest (0,14,0.5)
[h, p, ci] = binotest (14,14,0.5)

3) Also, "There are two methods to define the two tailed p-value" ( https://en.wikipedia.org/wiki/Binomial_test ) when p0 != 0.5. So we should either allow the user to choose which method to use, or at least document which is the method available.

Can you check on these?

Nir

Nir Krakauer <nir_krakauer>
Fri 17 Jun 2016 03:14:52 PM UTC, original submission:

Dear maintainers

enclosed a new function binotest() for the statistics package.
Syntax and structure is similar to other *test functions
There are two demos enclosed.
Results were compared to results computed by R.

I hope this is useful for others too.

With best regards

Andreas Stahel

Andreas Stahel <sha1>

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

Attach Files:

Comment:

Attached Files
file #37609:  binotest.m added by sha1 (5KiB - application/octet-stream)
file #37519:  binotest.m added by sha1 (4KiB - application/octet-stream)

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -email is unavailable- added by mtmiller (Posted a comment)
• -email is unavailable- added by arm_in (Posted a comment)
• -email is unavailable- added by lachlan (Updated the item)
• -email is unavailable- added by nir_krakauer (Posted a comment)
• -email is unavailable- added by sha1 (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.