# 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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.70049834,"math_prob":0.93125826,"size":2990,"snap":"2019-51-2020-05","text_gpt3_token_len":740,"char_repetition_ratio":0.1406564,"word_repetition_ratio":0.14910537,"special_character_ratio":0.24013378,"punctuation_ratio":0.10280374,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.997263,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,null,null,6,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-21T02:30:28Z\",\"WARC-Record-ID\":\"<urn:uuid:26e795a3-7d73-43c6-9bd2-15f952e31c3f>\",\"Content-Length\":\"110065\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e4784053-a603-48de-b3a9-95078165af24>\",\"WARC-Concurrent-To\":\"<urn:uuid:833dfb2b-92e7-41a7-8cf2-137e3645c102>\",\"WARC-IP-Address\":\"208.118.247.127\",\"WARC-Target-URI\":\"https://www.originlab.com/doc/X-Function/ref/ttest1\",\"WARC-Payload-Digest\":\"sha1:L22JHJVEAQULNZDSO5CF2FMLYAQVXKL6\",\"WARC-Block-Digest\":\"sha1:VTXEUY324IZNG5ZLJ65RYXJVLZHBOXKE\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250601241.42_warc_CC-MAIN-20200121014531-20200121043531-00454.warc.gz\"}"}