| **Navigation:**  [[templates.htm|Templates]] > Guide to all Templates > [[additional libraries and templates.htm|Additional Libraries and Templates]] > Statistics Library >====== ST1 (student's t for a single mean) ====== | [[ssxy sum of squares for x and y .htm|{{btn_prev_n.gif|Previous page}}]][[additional libraries and templates.htm|{{btn_home_n.gif|Return to chapter overview}}]][[sdeviationp standard deviation of a population .htm|{{btn_next_n.gif|Next page}}]] | | || **ST1**(//dataset//,//hypothesizedmean//) {{blk2blue.jpg|blk2blue.jpg}} | **ST1** | Returns the Student's t value for a given data set and hypothesized mean value. | | //Dataset// | The label of a QUEUE with its first component field defined as a REAL. | | //Hypothesizedmean// | A numeric constant or variable representing a hypothesized mean value associated with the statistical test. | **ST1 **computes the Student's t value for a given data set and hypothesized mean value. The function operates on the numeric set defined by all the entries in the first component of the designated QUEUE (//dataset//). The returned t value is used in a statistical test of an hypothesis about a normally distributed population based on a small sample. {{notebox.jpg|NoteBox.jpg}} The passed data set does not have to be sorted. The function copies the passed set. The passed data set is unchanged. **Return DataType:**     REAL **Example:** **StatSetXY  QUEUE,PRE()** **X           REAL** **           END** **TValue     REAL** **CODE** ** FREE(StatSetX)                     !free the QUEUE** ** CLEAR(STADAT:RECORD)               !clear the record buffer** ** STADAT:Id = STA:Id                 !prime the record buffer** ** STADAT:ItemNumber = 1** ** SET(STADAT:KeyIdItemNumber,STADAT:KeyIdItemNumber !position file pointer** ** LOOP                               !load the QUEUE** **   NEXT(StatisticsData)             !read next record** **   IF ERRORCODE() OR STADAT:Id NOT = STA:Id** **     BREAK** **   ELSE** **     StatSetX:X = STADAT:X          !load the QUEUE buffer** **     ADD(StatSetX)                  !add to the QUEUE** **   END** ** END** ** TValue = ST1(StatSetX,HypothesizedMean) !call ST1**