~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/plugins/distributions/clt/plot_geometric_clt.php

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2008-04-20 21:30:00 UTC
  • mfrom: (1.2.2 upstream) (3.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080420213000-fs4i8efmfc793bnn
new upstream release
closes: #475175
closes: #463348
closes: #475982

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
include ("plot_clt_common.php");
 
3
 
 
4
function doParameters () {
 
5
?>
 
6
prob <- <? echo(getRK_val ("prob")); ?>;
 
7
<?
 
8
}
 
9
 
 
10
function doExpVar () {
 
11
        global $nAvg;
 
12
?>
 
13
avg.exp <- (1-prob)/prob;
 
14
avg.var <- ((1-prob)/(prob^2))/<? echo ($nAvg); ?>;
 
15
<?
 
16
}
 
17
 
 
18
function doGenerateData () {
 
19
        global $nAvg;
 
20
        global $nDist;
 
21
?>
 
22
data <- matrix(rgeom(n=<? echo ($nAvg*$nDist); ?>, prob=prob), nrow=<? echo ($nAvg); ?>);
 
23
<?
 
24
}
 
25
?>