Skip to content

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

@vegerot

Description

@vegerot

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions