
例えば、下記のようなデータがあった場合

条件が1つの場合
条件付きの個数を求める:COUNTIF
eg. Genotype (B) が "CC", "CT", "TT" とあるデータの中から、"CT"は何個あるか求める場合 ▼

条件付きの平均を求める:AVERAGEIF
eg. Genotype (B) が "CC", "CT", "TT" となっているデータが "CT" である群の、Stage (C) の平均値を求める場合 ▼

条件付きの標準偏差(SD)を求める:STDEV + IF の組み合わせ
STDEVにはcountif, averageifのような構文はないので、STDEVとIF構文を組み合わせて使う。
eg. Genotype (B) が "CC", "CT", "TT" となっているデータが "CT" である群の、Stage (C) の標準偏差(SD)を求める場合 ▼
……そして、Cont+Shift+Enter
条件付きの標準誤差(SEM)を求める:標準偏差/COUNTIFの平方根
SEMは、「SD÷標本の個数の平方根」だから、「STDEV+IFで求めたSD」を、「√COUNTIF」で割ればいい。
平方根は、
で求めることができるので、eg. の場合は、
で求める事ができる。

最初から求めたかったら、

条件が2つ以上の場合
複数の条件付きの個数を求める:COUNTIFS
eg. Sex (A) が "M" で、Genotype (B) が "CT" であるデータは何個あるか求める場合 ▼

条件付きの平均を求める:AVERAGEIFS
AVERAGEIFSの場合は、平均値を求めたい範囲を先に指定するのがポイント。
eg. Sex (A) が "M" で、Genotype (B) が "CT" である群の、Stage (C) の平均を求める場合 ▼

……ちょっと疲れたので、今日はここまで。