Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/ztest2/docs/types/index.d"

Index

Interfaces

Functions

Functions

Export assignment ztest2

  • Computes a two-sample z-test.

    throws

    sigmax argument must be a positive number

    throws

    sigmay argument must be a positive number

    throws

    must provide valid options

    Parameters

    • x: NumericArray

      first data array

    • y: NumericArray

      second data array

    • sigmax: number

      known standard deviation of first group

    • sigmay: number

      known standard deviation of second group

    • Optional options: Options

      function options

    Returns Results

    test result object

    Example

    var x = [ 2.66, 1.5, 3.25, 0.993, 2.31, 2.41, 1.76, 2.57, 2.62, 1.23 ]; // Drawn from N(2,1)
    var y = [ 4.88, 2.93, 2.96, 4.5, -0.0603, 4.62, 3.35, 2.98 ]; // Drawn from N(3,2)
    
    var out = ztest2( x, y, 1.0, 2.0 );
    // returns {...}
    
    var table = out.print();