Product Selector

Fusion 5.12
    Fusion 5.12

    ttest

    The ttest function performs a two sided t-test on two random samples drawn from two queries. The ttest function takes four parameters:

    1. The numeric field on which to perform the t-test

    2. The query for drawing the first sample

    3. The query for drawing the second sample

    4. The sample size for both samples

    Sample syntax

    select ttest(sepal_width_d, "species_s:versicolor", "species_s:virginica", 150) as t,
           p_value
    from iris

    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:

    Sample result

    Visualization

    Sample visualization of the ttest function using the Apache Zeppelin number visualization:

    Sample visualization