Skip to content
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

Distributions #1

Merged
merged 21 commits into from Sep 11, 2017
Merged

Distributions #1

merged 21 commits into from Sep 11, 2017

Conversation

estebanz01
Copy link
Owner

@estebanz01 estebanz01 commented Aug 9, 2017

The idea behind this PR is to implement a bunch of distributions in order to do some stats with them.

Roadmap for the PR

  • Write a bunch of continuous distributions.
  • Write a bunch of discrete distributions.
  • Support arrays for p.d.f (Probability density functions). not necessary.
  • Allow to get a sample from distribution.
  • Write c.d.f for current continuous functions (Cumulative distribution function).
  • Extract special functions to independent module.

Current distributions (last updated 2017-09-11)

Discrete functions

  • Binomial.
  • Poisson.

Continuous functions

  • Beta.
  • Normal.
  • Standard Uniform.
  • Chi-squared.
  • F.
  • T-Student.
  • Uniform.
  • Weibull.

esteban zapata and others added 10 commits August 9, 2017 18:26
This change adds the Beta distribution with the following methods:
  * Beta function. If x,y not specified, it will use alpha, beta.
  * Probability density function (density_function).
  * Beta mode.
  * Beta mean.
This change adds two distributions: Normal and Standard Normal.
The following methods are available:
* Probability density function (density_function).
* Normal mode.
* Normal variance.
* Standard Normal mode.
* Standard Normal variance.
This change includes the following methods for the Chi-squared distribution:

* Probability density function.
* Mode.
* Variance.
This change adds the following methods for the F distribution:
* Probability density function.
* Mean.
* Mode.
This change adds the following methods for the T-Student distribution:
* Probability density function.
* Mean.
* Variance.
* Mode.
This changes adds the following methods for the Uniform distribution:
* Probability density function.
* Mean.
* Median.
* Variance.
Esteban Zapata Rojas and others added 11 commits August 9, 2017 19:57
This change allows to do Distribution:: instead of Statistics::Distribution::
This change adds the following methods for the Weibull distribution:
* Probability density function.
* Mean.
* Mode.
* Variance.
* distribution: weibull: Add Cumulative function.

This change allows to calculate probabilities based on the specified
scale and shape at initialize time.

* distribution: uniform: Add cumulative function.

This change allows to calculate the probability using the uniform
distribution for the specified value.

* distribution: weibull: Fix variance formula.

* distribution: beta: Add Cumulative distribution function.

This is a big change. It is composed by two changes:
  1. Implementation of the generalized incomplete beta function.
  2. The introduction of the cumulative distribution function, which
     is the same as the generalized incomplete beta function for the
     beta distribution.

Woot!

* distributions: t-student: Add Cumulative function.

This change allows to calculate probabilites based on the specified
degrees of freedom at initialize time.

* distribution: normal: Add cumulative function.

This change allows to use the CDF for the normal distribution and
the standard normal distribution as well.

* distribution: f: Add Cumulative function.

This change implements the cumulative distribution function for
the F-Distribution.

* distribution: chi-squared: Add cumulative function.

This change also includes a couple of special functions:
  * The composite simpson's rule.
  * The lower incomplete gamma function.
* Factorial for integer values.
* Combinations.
* Permutations.
This is the first of multiple discrete distributions. It brings:
* Binomial Cumulative distribution function.
* Binomial Probability mass function.
* Binomial mean.
* Binomial variance.
* Binomial mode.
Added poisson distribution with probability mass function and
cumulative function. It also includes mean and variance.
@estebanz01
Copy link
Owner Author

Leaving the sampling from a distribution as a TO-DO.

@estebanz01 estebanz01 merged commit 07b918c into master Sep 11, 2017
@estebanz01 estebanz01 deleted the distributions branch September 11, 2017 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant