time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (2484B)


      1 
      2 {{alias}}( x, y[, options] )
      3     Computes a two-sample F-test for equal variances.
      4 
      5     The returned object comes with a `.print()` method which when invoked will
      6     print a formatted output of the results of the hypothesis test.
      7 
      8     Parameters
      9     ----------
     10     x: Array<number>
     11         First data array.
     12 
     13     y: Array<number>
     14         Second data array.
     15 
     16     options: Object (optional)
     17         Options.
     18 
     19     options.alpha: number (optional)
     20         Number in the interval `[0,1]` giving the significance level of the
     21         hypothesis test. Default: `0.05`.
     22 
     23     options.alternative: string (optional)
     24         Either `two-sided`, `less` or `greater`.
     25 
     26     options.ratio: number (optional)
     27         Positive number denoting the ratio of the two population variances under
     28         the null hypothesis. Default: `1`.
     29 
     30     Returns
     31     -------
     32     out: Object
     33         Test result object.
     34 
     35     out.alpha: number
     36         Used significance level.
     37 
     38     out.rejected: boolean
     39         Test decision.
     40 
     41     out.pValue: number
     42         p-value of the test.
     43 
     44     out.statistic: number
     45         Value of test statistic.
     46 
     47     out.ci: Array<number>
     48         1-alpha confidence interval for the ratio of variances.
     49 
     50     out.nullValue: number
     51         Assumed ratio of variances under H0.
     52 
     53     out.xvar: number
     54         Sample variance of `x`.
     55 
     56     out.yvar: number
     57         Sample variance of `y`.
     58 
     59     out.alternative: string
     60         Alternative hypothesis (`two-sided`, `less` or `greater`).
     61 
     62     out.dfX: number
     63         Numerator degrees of freedom.
     64 
     65     out.dfY: number
     66         Denominator degrees of freedom.
     67 
     68     out.method: string
     69         Name of test.
     70 
     71     out.print: Function
     72         Function to print formatted output.
     73 
     74     Examples
     75     --------
     76     > var x = [ 610, 610, 550, 590, 565, 570 ];
     77     > var y = [ 560, 550, 580, 550, 560, 590, 550, 590 ];
     78     > var out = {{alias}}( x, y )
     79     {
     80         rejected: false,
     81         pValue: ~0.399,
     82         statistic: ~1.976,
     83         ci: [ ~0.374, ~13.542 ],
     84         // ...
     85     }
     86 
     87     // Print table output:
     88     > var table = out.print()
     89     F test for comparing two variances
     90 
     91     Alternative hypothesis: True ratio in variances is not equal to 1
     92 
     93         pValue: 0.3992
     94         statistic: 1.976
     95         variance of x: 617.5 (df of x: 5)
     96         variance of y: 312.5 (df of y: 7)
     97         95% confidence interval: [0.3739,13.5417]
     98 
     99     Test Decision: Fail to reject null in favor of alternative at 5%
    100     significance level
    101 
    102     See Also
    103     --------
    104