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

Is ZTest incorrectly calculating mean and σ for Normal Distribution? #15

Open
vegerot opened this issue Jul 18, 2023 · 0 comments
Open

Comments

@vegerot
Copy link

vegerot commented Jul 18, 2023

In

private static NormalDistribution distribution = new NormalDistributionImpl();
, the normal distribution we use has mean=0 and σ=1.

public class ZTest extends UDF {

	private static NormalDistribution distribution = new NormalDistributionImpl(); // mean=0,  σ=1

    public double pval(double val){
    	try {
			return   2 * (1 - distribution.cumulativeProbability(val));

However, shouldn't we instead be using mean=controlAvg and σ=controlStddev?

I'm a stats n00b so I'm probably missing something obvious. Does the criticalValue calculation normalize the data such that the mean and σ are standard?

@vegerot vegerot changed the title Is ZTest incorrectly calculated mean and σ for Normal Distribution? Is ZTest incorrectly calculating mean and σ for Normal Distribution? Jul 18, 2023
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

1 participant