-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add implementation of stats/base/dists/wald/skewness
#10206
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
base: develop
Are you sure you want to change the base?
feat: add implementation of stats/base/dists/wald/skewness
#10206
Conversation
Signed-off-by: Bhargav Dabhade <[email protected]> --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
left a comment
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.
Thanks!
|
|
||
| The [skewness][skewness] of a [Wald][wald-distribution] random variable with mean `μ` and shape parameter `λ > 0` is | ||
|
|
||
| <!-- <equation class="equation" label="eq:rayleigh_skewness" align="center" raw="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" alt="Skewness for a Rayleigh 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.
Looks like there are a couple of copy-paste issues on this line - the equation label says rayleigh_skewness and the alt text says "Rayleigh distribution" instead of Wald.
| <!-- <equation class="equation" label="eq:rayleigh_skewness" align="center" raw="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" alt="Skewness for a Rayleigh distribution."> --> | |
| <!-- <equation class="equation" label="eq:wald_skewness" align="center" raw="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" alt="Skewness for a Wald distribution."> --> |
| \mathop{\mathrm{skew}}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}} | ||
| ``` | ||
|
|
||
| <!-- <div class="equation" align="center" data-raw-text="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" data-equation="eq:logistic_skewness"> |
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.
Same kind of copy-paste issue here - the data-equation references the logistic distribution instead of Wald.
| <!-- <div class="equation" align="center" data-raw-text="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" data-equation="eq:logistic_skewness"> | |
| <!-- <div class="equation" align="center" data-raw-text="\operatorname{skew}\left( X \right) = 3 \sqrt{\frac{\mu}{\lambda}}" data-equation="eq:wald_skewness"> |
| mu = random_uniform( 0.1, 10.0 ); | ||
| lambda = random_uniform( 0.1, 20.0 ); | ||
| y = stdlib_base_dists_wald_skewness( mu, lambda ); | ||
| printf( "µ: %.4f, λ: %.4f, Mean(X;µ,λ): %.4f\n", mu, lambda, y ); |
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.
The printf label says "Mean" but this is computing skewness. The README's C example (line 215) has this correct already.
| printf( "µ: %.4f, λ: %.4f, Mean(X;µ,λ): %.4f\n", mu, lambda, y ); | |
| printf( "µ: %.4f, λ: %.4f, Skewness(X;µ,λ): %.4f\n", mu, lambda, y ); |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: missing_dependencies
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Progresses #209
Description
This pull request:
Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers