標準的な t-test レポートの作成
                標準的なスチューデント t-test レポートには、Group Statistics と Independent Samples Test の結果を含むテーブルを掲載できます。以下のセクションでは、QlikViewt-test 関数を 2 つの独立したサンプル グループ、Observation と Comparison に適用してテーブルを構築します。これらのサンプルに対応するテーブルは以下のようになります。
Group Statistics
| Type | N | Mean | Standard Deviation | Standard Error Mean | 
|---|---|---|---|---|
| Comparison | 20 | 11.95 | 14.61245 | 3.2674431 | 
| Observation | 20 | 27.15 | 12.507997 | 2.7968933 | 
Independent Sample Test
| - | t | df | Sig. (2-tailed) | Mean Difference | Standard Error Difference | 95% Confidence Interval of the Difference (Lower) | 95% Confidence Interval of the Difference (Upper) | 
|---|---|---|---|---|---|---|---|
| Equal Variance not Assumed | 3.534 | 37.116717335823 | 0.001 | 15.2 | 4.30101 | 6.48625 | 23.9137 | 
| Equal Variance Assumed | 3.534 | 38 | 0.001 | 15.2 | 4.30101 | 6.49306 | 23.9069 | 
サンプル データのロード
次の手順を実行します。
- 新規ドキュメントを作成します。
 - 
                        
ツールバーで [ロード スクリプトの編集] を選択し、次のスクリプトを入力します。
Table1:
crosstable LOAD recno() as ID, * inline [
Observation|Comparison
35|2
40|27
12|38
15|31
21|1
14|19
46|1
10|34
28|3
48|1
16|2
30|3
32|2
48|1
31|2
22|1
12|3
39|29
19|37
25|2 ] (delimiter is '|');
このロード スクリプトでは、crosstable に 3 つの引数が必要となるため、recno() が含まれています。よって、recno() により追加の引数 (この場合は各行の ID) が返されます。これが存在しない場合、Comparison サンプル値はロードされません。
 - スクリプトを保存し、[リロード] をクリックしてデータをロードします。
 
Group Statistics テーブルの作成
次の手順を実行します。
- 
                        
シートにストレート テーブルを追加し、軸として Type を選択します。
 - 
                        
以下の数式を追加します。
追加する数式 ラベル 数式 N Count(Value) Mean Avg(Value) Standard Deviation Stdev(Value) Standard Error Mean Sterr(Value)  - Type がソート リストの先頭にあることを確認します。
 
結果:
これらのサンプルの Group Statistics テーブルは以下のようになります。
| Type | N | Mean | Standard Deviation | Standard Error Mean | 
|---|---|---|---|---|
| Comparison | 20 | 11.95 | 14.61245 | 3.2674431 | 
| Observation | 20 | 27.15 | 12.507997 | 2.7968933 | 
Two Independent Sample Student's T-test テーブルの作成
次の手順を実行します。
- テーブルをシートに追加します。
 - 
                        
テーブルに以下の計算軸を軸として追加します。 =ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1))
 - 
                        
以下の数式を追加します。
追加する数式 ラベル 数式 conf if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_conf(Type, Value),TTest_conf(Type, Value, 0)) t if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_t(Type, Value),TTest_t(Type, Value, 0)) df if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_df(Type, Value),TTest_df(Type, Value, 0)) Sig. (2-tailed) if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_sig(Type, Value),TTest_sig(Type, Value, 0)) Mean Difference TTest_dif(Type, Value) Standard Error Difference if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_sterr(Type, Value),TTest_sterr(Type, Value, 0)) 95% Confidence Interval of the Difference (Lower) if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_lower(Type, Value,(1-(95)/100)/2),TTest_lower(Type, Value,(1-(95)/100)/2, 0)) 95% Confidence Interval of the Difference (Upper) if(ValueList (Dual('Equal Variance not Assumed', 0), Dual('Equal Variance Assumed', 1)),TTest_upper(Type, Value,(1-(95)/100)/2),TTest_upper(Type, Value,(1-(95)/100)/2, 0))  
結果:
これらのサンプルの Independent Sample Test テーブルは以下のようになります。
| - | t | df | Sig. (2-tailed) | Mean Difference | Standard Error Difference | 95% Confidence Interval of the Difference (Lower) | 95% Confidence Interval of the Difference (Upper) | 
|---|---|---|---|---|---|---|---|
| Equal Variance not Assumed | 3.534 | 37.116717335823 | 0.001 | 15.2 | 4.30101 | 6.48625 | 23.9137 | 
| Equal Variance Assumed | 3.534 | 38 | 0.001 | 15.2 | 4.30101 | 6.49306 | 23.9069 |