Skip to content

ENH: add 'alternative' and 'exact' keywords to stats.ansari#5012

Closed
aeklant wants to merge 1 commit intoscipy:masterfrom
aeklant:ansari
Closed

ENH: add 'alternative' and 'exact' keywords to stats.ansari#5012
aeklant wants to merge 1 commit intoscipy:masterfrom
aeklant:ansari

Conversation

@aeklant
Copy link
Copy Markdown
Contributor

@aeklant aeklant commented Jul 2, 2015

closes gh-688

@aeklant
Copy link
Copy Markdown
Contributor Author

aeklant commented Jul 2, 2015

@rgommers ping

I wanted to push an initial commit to review first just to make sure I understood the idea behind 'exact' and 'alternative' keywords. I will add regression tests once I have some feedback about this.

@rgommers rgommers added scipy.stats enhancement A new feature or improvement labels Jul 2, 2015
Comment thread scipy/stats/morestats.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for \n here, you can replace it with , to keep the output on a single line.

@rgommers
Copy link
Copy Markdown
Member

rgommers commented Jul 2, 2015

The exact keyword looks good to me. Haven't checked alternative yet.

@rgommers
Copy link
Copy Markdown
Member

The implementation of alternative here doesn't look right. The alternative hypotheses are:

  • ratio of scales is not equal to 1
  • ratio of scales is less than 1
  • ratio of scales is larger than 1

If you have two inputs x1 and x2, then if x1 has larger variance than x2 the p-value for 'less' has to be smaller than the p-value for 'greater'. In the current implementation they are the same.

I'll comment on gh-688 in more detail.

@mdhaber
Copy link
Copy Markdown
Contributor

mdhaber commented Mar 12, 2021

Closing in favor of gh-13650. Thanks @aeklant.

@mdhaber mdhaber closed this Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement A new feature or improvement needs-work Items that are pending response from the author scipy.stats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Statistics Review: ansari (Trac #161)

4 participants