Skip to content

rbarreiro/prob_calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Calculator for Finite Random Variables

Example execution:

Type q to quit.
>let rd20 = U{1,20}
>rd20
{1=0.05, 2=0.05, 3=0.05, 4=0.05, 5=0.05, 6=0.05, 7=0.05, 8=0.05, 9=0.05, 10=0.05, 11=0.05, 12=0.05, 13=0.05, 14=0.05, 15=0.05, 17=0.05, 16=0.05, 19=0.05, 18=0.05, 20=0.05}
>P(rd20<10)
0.44999999999999996
>P(rd20<=10)
0.49999999999999994
>let rd6 = U{1,6}
>let r3d6_5 = rd6+rd6+rd6+5
>rd6_5
null
>r3d6_5
{8=0.004629629629629629, 9=0.013888888888888888, 10=0.027777777777777776, 11=0.046296296296296294, 12=0.06944444444444445, 13=0.09722222222222222, 14=0.11574074074074073, 15=0.125, 17=0.11574074074074074, 16=0.125, 19=0.06944444444444445, 18=0.09722222222222224, 21=0.027777777777777776, 20=0.046296296296296294, 23=0.004629629629629629, 22=0.013888888888888888}
>P(r3d6_5>10)
0.9537037037037036
>q


Suported Random variables operations: +,*,-(unary and binary)

Suported conditions: <,>,<=,>=,=

Suported Random variables: Discrete Uniform (U{a,b}) and constants

About

Basic probatility calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages