ttest
function performs a two sided t-test on two random samples drawn from two queries. The ttest
function takes four parameters:
- the numeric field on which to perform the t-test
- the query for drawing the first sample
- the query for drawing the second sample
- the sample size for both samples
Sample syntax
Result set
The result set for the ttest function contains one row with the results of the ttest. The ttest function returns the t statistic. The p_value field can be selected to return the p-value for the ttest. Sample result set in Apache Zeppelin:
Visualization
Sample visualization of the ttest function using the Apache Zeppelin number visualization: