Skip to content

gammavariate uses misleading parameter names. #104337

Closed
@drj11

Description

@drj11

Documentation for gammavariate

The parameters of the gammavariate function (in random module) are alpha, beta.

We can see, from the mathematical description given, that these correspond to shape and scale. Wikipedia conventionally describes these using the symbols k and theta. Wikipedia uses beta for rate, which is the reciprocal of scale: beta = 1/theta

This is a proposal to:

  • explain that alpha and beta are also known as shape and scale;
  • reinforce that by adding that μ is proportional to scale;
  • add a warning that these are not the conventional names.

or, more controversially, scrap all that and rename the parameters k and theta. I understand that the parameter names leak into the API, so maybe not this option.

Side note: there is some variability in naming convention. The only textbook i have to hand is Grimmett and Stirzaker "Probability and Random Process" (OUP, 1982). That uses Γ(λ, t) where lambda is rate and t is shape.

(A clear and concise description of the issue.)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions