Check T-stat and Significance Values
Attached is a spec TTESTVALUES.SPX that shows how to use the same formula that Mentor uses to do significance testing and will print out all the intermediate values that are used in the test. In particular this prints the t-value which can be compared against other programs or statistical charts. The test must be an unweighted independent all_possible_pairs test (or a N/K test of only two columns which reduces to an all_possible_pairs). If the data is weighted it is possible to play with the formulas to also get the proper values. Change the defines below to find out the t and sig values for a percent test. It also prints out all the intermediate calculations.
>Define @Base1 942>Define @Freq1 542>Define @Base2 864>Define @Freq2 461>Define @Sig>PurgeSame>Prtfile $TValues >NumAdj=.000000001~In $~DefPcnt1: @Freq1 / @Base1Pcnt2: @Freq2 / @Base2TFreq: @Freq1 + @Freq2TBase: @Base1 + @Base2 P: TFreq / TBaseQ: 1 - P Vnum: P * QVden: 1 - (1 / TBase) Var: Vnum / Vden QNum: Pcnt1 - Pcnt2RepBase1: 1 / @Base1RepBase2: 1 / @Base2SumBases: RepBase1 + RepBase2QDen2: (Var/2) * SumBasesQDen: Sqrt(QDen2) Qval: Qnum / QDenTval: QVal / Sqrt(2)DofF: TBase - 1DofFData: [701.8]TvalData: [711.9*D5] Sig: TSig(DofFData,TvalData)ConfidLevel: 1 - Sig Proc= Showit: M TvalData = TvalM DofFData = DofF Prt "Values that are being tested"Prt "Freq1: 7s - Base1: 7s - PerCent1: 9.3s" @Freq1 @Base1 (Pcnt1*100)Prt "Freq2: 7s - Base2: 7s - PerCent2: 9.3s" @Freq2 @Base2 (Pcnt2*100)Prt "NCalculate Variance (Pooled)"Prt "Variance = VarNumerator / VarDenominator"Prt "VarNumerator= P * Q; VarDenominator= 1 - (1 / TotBase)"Prt "FreqTot: 7s - BaseTot: 7s - PerCentTot: 9.3s" TFreq TBase (P*100)Prt "P is PerCentTot/100 - Qvalue = 1 - PValue"Prt "P: 9.5s - Q: 9.5s" P QPrt "Var Numer: 9.7s - Var Denon: 9.7s - Variance: 9.7s" &Vnum Vden VarPrt "NCalculate Q value. Q is T times the Square root of 2"Prt "Qvalue = Qvalue Numerator / Qvalue Denominator"Prt "Qvalue Numerator= PCnt1 - PCnt2 (recorded as decimals)"Prt "Qvalue Denominator= Sqrt of (Variance/2) * (1 Over Base1 + 1 Over Base2)"Prt "1 Over Base1: .7s - 1 Over Base2: .7s - Sum: .7s" &RepBase1 RepBase2 SumBasesPrt "QValue Num: 11.7s - Qval Den Sqrd: 9.7s - Qval Den: 11.7s" &Qnum QDen2 QDenPrt "Qvalue: 11.7s" QvalPrt "NCalculate T (Q/Sqrt(2)), Degrees or Freedom and Significance"Prt "Tvalue: 11.7s - Deg of Freedom: 8s - Signif: 10.5s" &Tval DofF SigPrt "Confidence Level (1 - Sig): 10.5s2N" ConfidLevel}~Exc Proc=Showit~End
|