Giter Site home page Giter Site logo

abhranildas / gx2 Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 6.69 MB

Matlab toolbox to compute the statistics, pdf, cdf, inverse cdf and random numbers of the generalized chi-square distribution.

License: MIT License

MATLAB 100.00%
matlab-toolbox probability-distribution statistics

gx2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gx2's Issues

Error in the derivation of the mean of the normal variable?

In the derivation of the gx2 distribution from a quadratic form, the mean of the normal variable is calculated as:

m=q0-dot(w,lambda);

This agrees with the formula given in the paper (https://arxiv.org/abs/2012.14331):
$m = q(\mathbf{\mu}) - \mathbf{w}\cdot\mathbf{\lambda}$

But it seems to me that there is an error, and it should be:
$m = q(\mathbf{\mu}) - \mathbf{k}\cdot\mathbf{\lambda}$
(i.e. the noncentrality parameters should be weighed by the degrees of freedom of the Chi-squared distributions, $\mathbf{k}$).

That mean is derived from a previous formula in the paper, where the normal variable is defined as:
$\sum{b_{i^\prime} y_{i^\prime}} + \tilde{q_0} - \sum{(\frac{b_i}{2D_i})^2} $

The mean of that variable is meant to be the the value of that variable when $y_{i^\prime} = 0$, i.e.:
$\tilde{q_0} - \sum{(\frac{b_i}{2D_i})^2} $

Now, $\tilde{q}_0$ is defined as $q(\mathbf{\mu})$, which accounts for the first term; and the elements in the sum of the second term correspond to the definition of $\lambda_j$, for the unique values of the eigenvalues $D_i$.

Therefore, if I have followed that derivation correctly, each value of $\lambda_j$ should be weighed by the number of eigenvalues that are equal to $\lambda_j$ (i.e. the degrees of freedom $k_i$), and not the values of the eigenvalues ($w_j$).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.