PHP Classes

File: README-EL.md

Recommend this page to a friend!
  Packages of Christos Drogidis   CLT Simulator   README-EL.md   Download  
File: README-EL.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: CLT Simulator
Simulate the central limit theorem
Author: By
Last change:
Date: 28 days ago
Size: 3,502 bytes
 

Contents

Class file image Download

Central 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, ???? ?? «?????????» ???? ????? ????, ?????? ????????? ??? ????.