<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Student's t Test in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245631#M30664</link>
    <description>&lt;P&gt;&lt;SPAN&gt;List of Applied Statistics Algorithms ASA Algorithm 5 is the Student's test - with a non-central parameter.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is under a Public License -&amp;nbsp;&lt;A href="https://people.sc.fsu.edu/~jburkardt/f_src/asa005/asa005.html" target="_blank"&gt;https://people.sc.fsu.edu/~jburkardt/f_src/asa005/asa005.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Professor Burkardt publishes a lot of interesting code example.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2021 21:11:55 GMT</pubDate>
    <dc:creator>JohnNichols</dc:creator>
    <dc:date>2021-01-12T21:11:55Z</dc:date>
    <item>
      <title>Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1244988#M30636</link>
      <description>&lt;P&gt;Is the Student's t Test included in mkl?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 01:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1244988#M30636</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-01-11T01:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1244989#M30637</link>
      <description>&lt;P&gt;what do you mean by a Student Test?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 01:34:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1244989#M30637</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-01-11T01:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245012#M30639</link>
      <description>&lt;P&gt;It would be useful to have a function in MKL to obtain the inverse of the cumulative&amp;nbsp;&lt;A href="https://mathworld.wolfram.com/Studentst-Distribution.html" target="_self"&gt;Student t-distribution&lt;/A&gt;&amp;nbsp;function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; t = tinv(p, n_f)&lt;/P&gt;
&lt;P&gt;where p is the probability and n_f is the number of degrees of freedom. This function is available in Matlab, R (tinv), IMSL (tin), etc. It is useful in obtaining the p-percent confidence intervals of the parameter values obtained from fitting an expression to data using nonlinear least squares (MKL TRNLSP).&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 03:18:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245012#M30639</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2021-01-11T03:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245018#M30640</link>
      <description>&lt;P&gt;Thanks for the clarification, mecej. I see what John wanted to see. We will try to add this topic to further plans and will keep this thread informed.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 03:44:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245018#M30640</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-01-11T03:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245118#M30642</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;
&lt;P&gt;in oneMKL we have Random Number Generators component where we provide distribution generators (routines to generate random numbers sequences with the specific statistical properties).&lt;/P&gt;
&lt;P&gt;Could you please clarify – are you interested in tinv(p, n_f) like function only? Or also in Student t-distribution generator?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 11:51:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245118#M30642</guid>
      <dc:creator>Pavel_D_Intel1</dc:creator>
      <dc:date>2021-01-11T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245242#M30648</link>
      <description>&lt;P&gt;Pavel:&lt;/P&gt;
&lt;P&gt;The most common statistical test in experimental work after the mean and the standard deviation is the Student's t Test.&amp;nbsp; It is a very simple test to use - essentially it takes 2 sets of numbers and tells you if they are different and how different.&amp;nbsp; Guinness&amp;nbsp; Brewery invented for quality control.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An example, the average age of a kindergarten class is 5.&amp;nbsp; And the average age of the people who use this forum would be 30+. The two are distinct.&amp;nbsp; Student's t Test allows you to quantify it. It has a fairly simple number &amp;gt;2 different &amp;lt;2 same, is a good approximation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For large data sets it is the best test.&amp;nbsp; &amp;nbsp;The reason we need it in Fortran is where there are more than 1.2 million data points, EXCEL will not do an analysis.&amp;nbsp; At the moment I am looking at sets with 6.5 million records, only Fortran or C will handle this quickly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In searching for MKL - I was surprised how many of the many standard programs like MAPLE, NASTRAN, AutoCAD use mkl.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 20:05:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245242#M30648</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-01-11T20:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245341#M30651</link>
      <description>&lt;P&gt;A quick and dirty attempt at the Student's t Test for million element sets, where I pick out the first peak between indices of the count array from 89 to 101 provides a set test data to determine if the natural frequency changes with time.&amp;nbsp; It appears to - each million elements is 100 days and each million elements contains about 4% density in the required range.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;  subroutine mean(i,j,countFZ, meanA, stdevA,countFZA,meanFZA, standevFZA, flag)
    implicit none

    integer i, j, k, l
    integer countFZ(kl)
    integer countFZA(kl, mn_9)
    REAL (KIND=dp) meanFZA(mn_9),standevFZA(mn_9)
    integer flag
    REAL (KIND=dp) counter, count, counterV, countold,t, sp,sp1
    REAL (KIND=dp) meanA,  variance, stdevA, meanold, varianceold

    counter = 0.0
    count = 0.0
    counterV = 0.0
    meanA = 0.0
    variance = 0.0

    do 100 k = i,j

        counter = counter + real(countFZ(k)) * real(k)
        count = count + real(countFZ(k))
        ! write(*,1000)k, countFZ(k), counter, count
1000    Format(i7,3('  ',f12.0) )

100 end do


    meanA = real(counter)/real(count)
    count = 0.0
    do 101 k = i,j


        counterV = counterV + (real(countFZ(k))) * ((real(k) - meanA) ** 2.0)
        count = count + real(countFZ(k))

        ! write(*,1001)k, countFZ(k), counter, counterV, count
1001    Format(i7,4('  ',f12.0) )

101 end do

    variance = real(counterV)/real(count)

    write(*,500)0, meanA, variance, sqrt(variance), count
    meanold = meanA
    varianceold = variance
    countold = count

500 Format(" Data set  :: ", i4,3('  ',f10.3), ' Count :: ',f7.0, ' Sp : ', f10.3, ' sp1 : ',f10.3,' t-Stat : ',f10.3)
    stdevA = sqrt(variance)

    write(*,120)flag
120 Format("       Flag for the data size :: ", i3)

    do 300 l = 1, flag
        counter = 0
        count = 0
        do 200 k = i,j

            counter = counter + real(countFZA(k,l)) * real(k)
            count = count + real(countFZA(k,l))
            !  write(*,1000)k, countFZA(k,l), counter, count

200     end do
        meanFZA(l) = counter/count

        count = 0.0
        counterV = 0.0
        do 400 k = i,j


            counterV = counterV + (real(countFZA(k,l))) * ((real(k) - meanFZA(l)) ** 2.0)
            count = count + real(countFZA(k,l))

            !   write(*,1001)k, countFZA(k,l), counter, counterV, count

400     end do

        variance = counterV/count
        standevFZA(l) = sqrt(variance)
        sp = sqrt((((countold-1.0)*varianceold)+((count-1.0)*variance))/(countold+count-2))
        sp1 = sp*sqrt((1.0/countold)+(1.0/count))
        t = (meanFZA(l) - meanold)/sp1

        write(*,500)l,meanFZA(l),variance,sqrt(variance),count,sp,sp1,t
        meanold = meanFZA(l)
        varianceold = variance
        countold = count

300 end do



    return
    end subroutine&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/14690i5CD99D740C390E4A/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I took the standard algorithm from wikipedia -- not equal means or variances.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A t-Stat of 31 to 80 represents an almost zero chance they are the same - mean is 95 column and the variance is the 1.15 column.&amp;nbsp; The counts make is so accurate.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got to check it and put in error checking.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a temperature dependence on the stiffness, but it is impossible to discern at 100 day blocks with any accuracy.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 00:47:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245341#M30651</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-01-12T00:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245492#M30661</link>
      <description>&lt;P&gt;John,&lt;/P&gt;
&lt;P&gt;thanks a lot for the detailed description.&lt;/P&gt;
&lt;P&gt;In oneMKL we haven’t the specific routine for Student’s t-test.&lt;BR /&gt;But oneMKL contains Summary Statistics component which can be useful here.&lt;/P&gt;
&lt;P&gt;oneMKL Summary Statistics provides routines that compute basic statistical estimates for single and double precision multi-dimensional datasets.&lt;/P&gt;
&lt;P&gt;As I understand mean and variance computation routines (supported in oneMKL Summary Statistics) could help to reduce the code and increase performance of the Student’s t-test application.&lt;/P&gt;
&lt;P&gt;Fortran APIs description can be found here: &lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/statistical-functions/summary-statistics.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/statistical-functions/summary-statistics.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please let me know if I could help you more here.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 13:35:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245492#M30661</guid>
      <dc:creator>Pavel_D_Intel1</dc:creator>
      <dc:date>2021-01-12T13:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245621#M30663</link>
      <description>&lt;P&gt;Pavel:&lt;/P&gt;
&lt;P&gt;Thank you for the explanation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data is in a format where is is simpler to take the first moment and then the second moment to get the variance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The interesting issue is the amplitude of the t-Stat -- it is way beyond the published tables. So I will need to encode estimating the probability as well.&amp;nbsp; A 1:1000 p value has a t-Stat of about 3.5 for this number of elements, but we are at 37.&amp;nbsp; Interestingly the same problem arises in EXCEL with large data sets when you start looking for 5 and 6 standard deviations p estimates.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am pretty sure you have the Box Mueller Random Number generator.&amp;nbsp; There is a standard reference that some have used for discussing the Box Mueller Theory from the 1950s.&amp;nbsp; When I was writing a paper, I thought I should get a copy of this original paper if I wanted to reference it - you are supposed to read what you reference.&amp;nbsp; It came from a famous statistical group at a major Eastern University.&amp;nbsp; I sent them a message and asked for a pdf of the paper as I could not find it online.&amp;nbsp; I wanted to see the original math, so I could follow the Fortran.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;They came back and said they had no idea, but they finally tracked down a copy and scanned it for me.&amp;nbsp; Apparently I was the first person to ask for it in a long time.&amp;nbsp; There is a brief version in a journal in 1958, but not the entire mathematics, if I remember correctly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everyone assumes that someone else has seen it so it is ok to reference.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same thing happens with a famous book on Seismology in Japan. This book is quoted often, a friend once found there is one acknowledged copy of this book in a Scottish University&amp;nbsp; and no others. There are no pdf's.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnNichols_0-1610484533034.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/14720i7EF558C1A97CB8F2/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="JohnNichols_0-1610484533034.png" alt="JohnNichols_0-1610484533034.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 20:50:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245621#M30663</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-01-12T20:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245631#M30664</link>
      <description>&lt;P&gt;&lt;SPAN&gt;List of Applied Statistics Algorithms ASA Algorithm 5 is the Student's test - with a non-central parameter.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is under a Public License -&amp;nbsp;&lt;A href="https://people.sc.fsu.edu/~jburkardt/f_src/asa005/asa005.html" target="_blank"&gt;https://people.sc.fsu.edu/~jburkardt/f_src/asa005/asa005.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Professor Burkardt publishes a lot of interesting code example.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 21:11:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1245631#M30664</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2021-01-12T21:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1246663#M30691</link>
      <description>&lt;P&gt;John,&lt;/P&gt;
&lt;P&gt;I am not sure that this has anything to do with your issue...&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;A quick and dirty attempt at the Student's t Test for million element sets&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;integer countFZ(kl)
...
REAL (KIND=dp) counter, count, counterV, countold,t, sp,sp1
...
counter = counter + real(countFZ(k)) * real(k)
...
meanA = real(counter)/real(count)
...
counterV = counterV + (real(countFZ(k))) * ((real(k) - meanA) ** 2.0)
count = count + real(countFZ(k))
...
counter = counter + real(countFZA(k,l)) * real(k)
count = count + real(countFZA(k,l))
...
counterV = counterV + (real(countFZA(k,l))) * ((real(k) - meanFZA(l)) ** 2.0)
count = count + real(countFZA(k,l))
&lt;/LI-CODE&gt;
&lt;P&gt;The code is using real(dp) for variable types of the results (lhs) contained within loops where k iterates a million (millions?) of times.&lt;/P&gt;
&lt;P&gt;the use of real(something) as opposed to real(something, kind=dp) may introduce undesirable round off errors.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 15:59:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1246663#M30691</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2021-01-15T15:59:29Z</dc:date>
    </item>
    <item>
      <title>Re:Student's t Test</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1252641#M30820</link>
      <description>&lt;P&gt;This request will not be implemented. The issue is closing and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Feb 2021 05:02:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Student-s-t-Test/m-p/1252641#M30820</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-02-03T05:02:10Z</dc:date>
    </item>
  </channel>
</rss>

