In this example we test the equality of the variances of two data sets that belong to a normal distribution. We start this example by creating 3 waves of different statistics. The first pair (data1 and data2) have the same variance but different means. The second pair (data2 and data3) have the same mean but different variance. To create the data execute the commands:

`Make/n=100 data1=100+gnoise(3)`
`Make/n=80 data2=80+gnoise(3)`
`Make/N=90 data3=80+gnoise(4)`

### Comparing the variance of two waves using a two-tailed hypothesis

To run the test execute the command:

`StatsFTest/T=1/Q  data1,data2`

The results of the test appear in the F-Test table:

 n1 100 Mean1 99.8754 Stdv1 3.39174 degreesOfFreedom1 99 n2 80 Mean2 79.6029 Stdv2 3.10709 degreesOfFreedom2 79 F 1.19162 lowCriticalValue 0.659763 highCriticalValue 1.53104 P 0.418974 Accept 1

The F statistic is within the critical range so the two-tailed hypothesis of equal variances is accepted.

### Testing in the case of unequal variances (two tails test)

To run the test execute the following command:

`StatsFTest/T=1/Q  data1,data3`

The results of the test appear in the F-Test table:

 n1 100 Mean1 99.8754 Stdv1 3.39174 degreesOfFreedom1 99 n2 80 Mean2 80.5489 Stdv2 4.43966 degreesOfFreedom2 79 F 0.583641 lowCriticalValue 0.659763 highCriticalValue 1.53104 P 0.0112429 Accept 0

The rejection of H0 in this case is pretty sensitive to the choice of significance. It is apparent from the P-value that it would have been accepted if alpha was set to 0.01.

### One-tail testing for the same data

First H0: the variance of the first sample is greater than the variance of the second. To run the test execute the command:

`StatsFTest/T=1/Q/TAIL=1  data1,data3`
 n1 100 Mean1 99.8754 Stdv1 3.39174 degreesOfFreedom1 99 n2 80 Mean2 80.5489 Stdv2 4.43966 degreesOfFreedom2 79 F 0.583641 Critical 0.70553 P 0.00562143 Accept 0

H0 is rejected here as one would expect. Similarly,

`StatsFTest/T=1/Q/TAIL=2  data1,data3`
 n1 100 Mean1 99.8754 Stdv1 3.39174 degreesOfFreedom1 99 n2 80 Mean2 80.5489 Stdv2 4.43966 degreesOfFreedom2 79 F 0.583641 Critical 1.4289 P 0.00562143 Accept 1

Here the F is smaller than the critical value so the two-tailed hypothesis can't be rejected. Forum Support Gallery
{"ft_lang_label":"__label__en","ft_lang_prob":0.7291579,"math_prob":0.9106221,"size":2399,"snap":"2020-10-2020-16","text_gpt3_token_len":767,"char_repetition_ratio":0.12734865,"word_repetition_ratio":0.23579545,"special_character_ratio":0.36140057,"punctuation_ratio":0.10995851,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.982476,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-23T07:44:12Z\",\"WARC-Record-ID\":\"<urn:uuid:f48e30ec-b51c-4017-ab4b-4a3124d576fc>\",\"Content-Length\":\"51853\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4961a263-b661-428e-854a-11358a24f922>\",\"WARC-Concurrent-To\":\"<urn:uuid:750b06f0-7790-488c-9651-7e9fe15b7f44>\",\"WARC-IP-Address\":\"67.225.238.18\",\"WARC-Target-URI\":\"https://www.wavemetrics.com/products/igorpro/dataanalysis/statistics/tests/statistics_pxp13\",\"WARC-Payload-Digest\":\"sha1:WSBTVRRDSQ4ASYOQBCYOZNVUZ3MJKJWO\",\"WARC-Block-Digest\":\"sha1:H2ZMMYSRCSLAS3VRG74IH4KLCO6DXUC7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875145747.6_warc_CC-MAIN-20200223062700-20200223092700-00452.warc.gz\"}"}