# 2.13.2.3 ttest1

## Brief Information

One-Sample t-test

## Command Line Usage

 

1. ttest1 irng:=Col(A); 

2. ttest1 irng:=Col(A) mean:=10 tail:=1; 

3. ttest1 irng:=Col(A) alpha:=0.05; 

3. ttest1 irng:=Col(A) prob:=myprob; 

## Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>

This variable specifies the input data range.

Hypothetical mean mean

Input

double

0

This variable specifies a value for the null hypothesis mean

Tail tail

Input

int

two

Alternative hypothesis specified by the tail. (Suppose m is the sample mean and m0 is the hypothetical mean.)

Option list

• two:Two Tailed
H0: m <> m0
Test whether the sample mean equals to the hypothetical mean
• upperUpper Tailed
H0: m > m0
Test whether the sample mean is larger than the hypothetical mean
• lower:Lower Tailed
H0: m < m0
Test whether the sample mean is less than the hypothetical mean.
Significance level alpha

Input

double

0.05

Set the significance level of the test

Statistic stat

Output

double

<unassigned>

This variable specifies the output for the t-test statistic

Degrees of freedom df

Output

double

<unassigned>

This variable specifies the output for the degrees of freedom for the sample data

P-value prob

Output

double

<unassigned>

This variable specifies the output for the associated p-value of the test.

Lower confidence limit lcl

Output

double

<unassigned>

This variable specifies the output for the lower confidence limit for the hypothetical mean of the sample data.

Upper confidence limit ucl

Output

double

<unassigned>

This variable specifies the output for the upper confidence limit for the hypothetical mean of the sample data.

## Description

This function is LabTalk accessing only and performs one-sample t-test for a given dataset.

The one-sample Student's t-Test determines whether or not the mean of a sample taken from a normally distributed population is consistent with the hypothetical value for a given confidence level. By choosing a one- or two-tailed t-test, you can test how likely it is that the sample mean is greater than, less than, or equal to the true population mean. Note that the one-sample t-test is appropriate when the standard deviation of the entire population is unknown.

The t statistic value and p-value will be calculated to decide whether or not to reject the null hypothesis. The p-value is the probability that null hypothesis is true, and a small p-value suggests that you should reject it.

The confidence interval provides lower and upper limits for the possible value of the population mean. For a given significance level, $\alpha$., this interval indicates we have 100 $\times$(1-$\alpha$) % confidence to say the true population mean falls within the interval.