DownloadCentral Limit Theorem (CLT) - PHP Simulator
?? ??????? ????????? ????? (Central Limit Theorem - CLT) ????? ??? ??? ??? ??? ??????????? ????? ??? ???????????.
?? ???? ?????: ???? ????????? ??????? ?????? ????? ??? ?????? ????????, ? ???????? ????? ??? ????? ?????? ?? ??????? ???????? (bell curve), ?????????? ??? ?? ????? ??? ??????? ?????????.
???? ?? ????? project ???????? ???? CLT Simulator ?? PHP, ??????????????? ??? ???? ??????????:
?????? ?????? ? ????? ???? ? ???????? ?????.
?????? ??? project
-
?? ?????? ??? ?????????? ?? CLT ???? ?????.
-
?? ???????????? ???????? ????????.
-
?? ?????????? ?????? ?????????? (mean, std deviation, min, max).
-
?? ???????????? ??? ?? ????? ???? ?????????? ??? ????????? 3.5 (????? ???? ??????).
????
/public
index.htmlp
/src
CLTSimulator.php
composer.json
example.php
README-EL.md
README.md
web-demo.php
??? ?????????? ? CLT ???;
-
???? ???? ????? ???? 1-6 (?????????? ????????).
-
????????? N ????? ? ???????????? ???? ???.
-
??????????????? ?? ?????????? numSamples ?????.
-
?? ????? ???? ??????????? ??? ??????? ???????? ???? ??? ?? 3.5.
-
??? ?????????? ?? sample size, ???? ??? «????????» ? ????????.
?????????? ??????
require 'src/CLTSimulator.php';
$sim = new CLTSimulator();
$numSamples = 10000; // ???? ????????
$sampleSize = 30; // ??????? ???? ?????????
$means = $sim->simulate($numSamples, $sampleSize);
$stats = $sim->statistics($means);
echo "??????????? Central Limit Theorem\n";
echo "????????: $numSamples | ??????? ?????????: $sampleSize\n\n";
echo "????? ???? ???? ??? ?????: {$stats['mean']} (?????????? = 3.5)\n";
echo "?????? ????????: {$stats['std_dev']}\n";
echo "?????: {$stats['min']} - {$stats['max']}\n";
??????????? ????????????
?? sampleSize = 30 ??? numSamples = 10000:
-
? ????? ???? ?? ????? ????? ??? 3.5
-
? ?????? ???????? ?? ????? ?????
-
?? ????? ?? ????????? ???? ??? 2.5-4.5
-
? ???????? ??? ????? ?? ??????? ?? ???????? ????????
?????
MIT License.
?? ??????? ?????? ?? CLT;
??? ?? ????? ???? ????? ???? ??? ??????????? ??? ?? ?????????? ????????.
????? ??? ??? ??????? dataset, ???? ?? «?????????» ???? ????? ????, ?????? ????????? ??? ????.
|