Talk:Verify distribution uniformity/Chi-squared test: Difference between revisions

Content added Content deleted
Line 14: Line 14:
:I am not completely sure what "the incomplete gamma function" is, but here's the J implementation:
:I am not completely sure what "the incomplete gamma function" is, but here's the J implementation:


<lang j>4 :0
:<lang j>4 :0
(1 H. (1+x) % x&((* ^) * (^ -)~)) y
(1 H. (1+x) % x&((* ^) * (^ -)~)) y
)</lang>
)</lang>


So, for example if x is 1.5 and y is 4.1
:So, for example if x is 1.5 and y is 4.1


<lang j> (1 H. (1+1.5) % 1.5&((* ^) * (^ -)~)) 4.1
:<lang j> (1 H. (1+1.5) % 1.5&((* ^) * (^ -)~)) 4.1
0.848957</lang>
0.848957</lang>


The right argument to H. is:
:The right argument to H. is:


<lang j> ((1+1.5) % 1.5&((* ^) * (^ -)~)) 4.1
:<lang j> ((1+1.5) % 1.5&((* ^) * (^ -)~)) 4.1
0.229307</lang>
0.229307</lang>


In other words, 2.5 divided by 10.9024:
:In other words, 2.5 divided by 10.9024:


<lang j> ( 1.5&((* ^) * (^ -)~)) 4.1
:<lang j> ( 1.5&((* ^) * (^ -)~)) 4.1
10.9024</lang>
10.9024</lang>


In other words (1.5 * ^ 4.1) * 4.1 ^ -1.5. (^y with no left argument is e^y).
:In other words (1.5 * ^ 4.1) * 4.1 ^ -1.5. (^y with no left argument is e^y).


And H. is the primitive documented at http://www.jsoftware.com/help/dictionary/dhcapdot.htm
:And H. is the primitive documented at http://www.jsoftware.com/help/dictionary/dhcapdot.htm


I do not know if this helps, though.
:I do not know if this helps, though.


--[[User:Rdm|Rdm]] 22:28, 7 May 2011 (UTC)
--[[User:Rdm|Rdm]] 22:28, 7 May 2011 (UTC)