Presentation is loading. Please wait.

Presentation is loading. Please wait.

PH24010 MathCAD Statistics, Random Numbers & Histograms.

Similar presentations


Presentation on theme: "PH24010 MathCAD Statistics, Random Numbers & Histograms."— Presentation transcript:

1 PH24010 MathCAD Statistics, Random Numbers & Histograms

2 Distribution Functions dnorm(x, ,  ) –Normal distribution pnorm(x, ,  ) –Cumulative Normal distribution –Equal to

3 Other distributions Poisson –dpois( r, ) ppois( r, ) –r events in distribution with mean Binomial –dbinom(k,n,p) pbinom(k,n,p) –k success in n trials, probability p Exponential –dexp(x,r) –Exponential distribution, decay rate r

4 Histograms histogram(Intvls, Data) Returns Matrix Results –Midpoints of intervals Results –Count per bin

5 The Intervals vector Gives endpoints of intervals n elements in vector  n-1 midpoints Watch for Fencepost error Off-by-one-error –Obi-One-’kin-Error

6 Generating the Intervals Vector Program Local Variables for loop Use programming toolbar Test program

7 Coins, Dice & other random things rnd(x)  random number in range 0 to x manipulate to get desire result rnd(1)>0.5 will give –0 for 50% and –1 for 50% –True=1, false =0 int(rnd(6)) gives number 0 to 5

8 Other Random Distributions Return vector of m numbers rnd(m,a,b)  uniform distribution rnorm(m, ,  )  normal distribution rpois(m, )  Poisson distribution rexp(m,r)  exponential distribution ++ others see f(x) & help

9 Pseudo-Randomness & seed Numbers generated in sequence Same sequence every time worksheet run SEED variable sets start point in sequence Integer from 1 to 2147483647 Change seed with –Tools|Worksheet Options|Built-in variables –Seed(x) Seed(trunc(time(0)))


Download ppt "PH24010 MathCAD Statistics, Random Numbers & Histograms."

Similar presentations


Ads by Google