-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: clarify the definition of the pdf of stats.fisk
#14003
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -883,6 +883,12 @@ class burr_gen(rv_continuous): | |
----- | ||
The probability density function for `burr` is: | ||
|
||
.. math:: | ||
|
||
f(x, c, d) = c d x^{c - 1} / (1 + x^{c})^{d + 1} | ||
|
||
Also equivalent to: | ||
|
||
.. math:: | ||
|
||
f(x, c, d) = c d x^{-c - 1} / (1 + x^{-c})^{d + 1} | ||
|
@@ -1079,10 +1085,17 @@ class fisk_gen(burr_gen): | |
----- | ||
The probability density function for `fisk` is: | ||
|
||
.. math:: | ||
|
||
f(x, c) = c x^{c-1} (1 + x^{c})^{-2} | ||
|
||
Also equivalent to: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually confusing, without reading the linked issue it was non-obvious that this wasn't a mistake. I suggest the following rephrase: Please note that the above expression can be transformed into the following one, which is also commonly used: |
||
|
||
.. math:: | ||
|
||
f(x, c) = c x^{-c-1} (1 + x^{-c})^{-2} | ||
|
||
|
||
for :math:`x >= 0` and :math:`c > 0`. | ||
|
||
`fisk` takes ``c`` as a shape parameter for :math:`c`. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two formulas are only equivalent for
d=1
, i.e. for the fisk distribution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the pdf formula for burr distribution, so the first one is the right one ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, looks like the first one is the right one. Also, if we're using LaTeX anyway, let's use
\frac
and make it look identical to how the pdf is given on Wikipedia.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the second one, the original one, is the intended one for the
burr
distribution.This is:
![image](https://user-images.githubusercontent.com/6570539/155267001-89e8ca81-423e-4778-8c5e-c258ad2e3edf.png)
Taking the derivative and changing the symbols used for the parameters, it turns into:
![image](https://user-images.githubusercontent.com/6570539/155267172-cced3377-06fc-4ee2-807a-f82464c39054.png)
This is what the code implements when
x != 0
:(I'll leave simplifying that to another time...)
It seems that the other one is
burr12
.