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

sigma_a computation for binomial #2

Open
seekshreyas opened this issue Jun 20, 2020 · 1 comment
Open

sigma_a computation for binomial #2

seekshreyas opened this issue Jun 20, 2020 · 1 comment

Comments

@seekshreyas
Copy link

seekshreyas commented Jun 20, 2020

Hi @cbellei,

Thanks for an amazing load of work here. Really impressive.

While going over the code I saw this:

sigma_a_rvs = np.sqrt(a_rvs * (1 - a_rvs))
sigma_b_rvs = np.sqrt(b_rvs * (1 - b_rvs))

at: https://github.com/cbellei/abyes/blob/master/abyes/ab_exp.py#L148

Shouldn't the n_a in the formula as well?
As for binomial distribution
standard deviation (σx) is sqrt[ n * P * ( 1 - P ) ].

Thanks in advance. I'm happy to send a PR, but wanted to check first if I'm correct.

@cbellei
Copy link
Owner

cbellei commented Jun 22, 2020

Hello @seekshreyas , thanks for the nice words!

I haven't looked at this in a long time, but this should be the standard deviation for a Bernoulli distribution so I think it is ok. The binomial distribution is used in the examples in order to obtain one particular realization of a series of experiments drawn from a Bernoulli distribution.

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

No branches or pull requests

2 participants