2013-02-13 9 views
1

표준 정규 누적 분포 함수에 대한 PHP 함수가 있습니까?표준 정규 누적 분포 함수

찾을 수 없습니다.

플러그인/라이브러리도 좋습니다.

어디 있는지 알려주세요.

미리 감사드립니다.

stats_cdf_normal

Fatal error: Call to undefined function stats_cdf_normal()

답변

3

PECL stats package에서 문서화되지 않은 stats_cdf_normal() 기능이있다 제공합니다. 이 페이지의 하단에 메모 밖으로

확인 : http://www.php.net/manual/en/ref.stats.php

oliver at •••••••• dot com:

There are some undocumented functions in this extension, eg I found the following by reading the DCDFLIB docs and some trial and error:

<?php 

/** 
* stats_cdf_normal($x, $mean, $sd, 1) 
* @return float cumulative probablity 
*/ 
echo stats_cdf_normal(1.96, 0, 1, 1) . "\n"; 

/** 
* stats_cdf_normal($p, $mean, $sd, 2) 
* @return float x which bounds cumulative probalility $p 
*/ 
echo stats_cdf_normal(0.975, 0, 1, 2) . "\n"; 

// less useful 
// echo stats_cdf_normal(0.4,0.5,0.6,3) . "\n"; 
// echo stats_cdf_normal(0.4,0.5,0.6,4) . "\n"; 
?> 
+0

잘 했어. 우리 옛 사람은 당신과 어울리지 못합니다! – mkaatman

+0

왜이 답변에 대한 downvote? –

+0

@JoeCoderGuy이 함수는 PECL 패키지에 있습니다 (편집 참조). 내 시스템에 설치했는데 제대로 작동하는 것 같습니다. –