 # vb2008-for-statistcs.rar

• nickel2000
了解作者
• Visual Basic
开发工具
• 29KB
文件大小
• rar
文件格式
• 0
收藏次数
• 1 积分
下载积分
• 5
下载次数
• 2013-05-31 12:13
上传日期
vb2008可以使用的统计函数大全，txt改成bas格式，可以直接调用。 vb2008-for-statistcs.rar
• chi2_bas.txt
6.2KB
• tmdian1_dat.txt
502B
• prob_bas.txt
5KB
• tmdian_bas.txt
4.8KB
• tnormal_bas.txt
7.9KB
• tmdian1_bas.txt
4.4KB
• momnts_bas.txt
4.1KB
• fdistri_bas.txt
4.9KB
• tmoment_bas.txt
3.4KB
• ibeta_bas.txt
3.6KB
• tstats_bas.txt
7KB
• distri_bas.txt
11.7KB
• simlp_bas.txt
7KB
• normal_bas.txt
2.1KB
• moment_bas.txt
5.8KB
• fstat_bas.txt
6.5KB
• student_bas.txt
5.7KB
• gamma_bas.txt
2.3KB

'*************************************************** '* Statistical distributions * '* ----------------------------------------------- * '* This program allows computing several dis- * '* tributions: * '* 1. binomial distribution * '* 2. Poisson distribution * '* 3. normal distribution * '* 4. normal distribution (2 variables) * '* 5. chi-square distribution * '* 6. Student T distribution * '* ----------------------------------------------- * '* REFERENCE: "Mathematiques et statistiques By H. * '* Haut, PSI Editions, France, 1981" * '* [BIBLI 13]. * '* ----------------------------------------------- * '* SAMPLE RUN: * '* * '* Statistical distributions * '* * '* Tutorial * '* * '* 1. Input distribution number:" * '* * '* 1: binomial distribution" * '* 2: Poisson distribution" * '* 3: normal distribution" * '* 4: normal distribution (2 variables)" * '* 5: chi-square distribution * '* 6: Student T distribution" * '* * '* 2. Define the parameters of chosen distribution * '* * '* 3. Input value of random variable" * '* * '* * '* Input distribution number (1 to 6): 3 * '* * '* Normal distribution * '* * '* MU=mean * '* S =standard deviation * '* X =value of random variable * '* * '* MU = 2 * '* S = 3 * '* X = 5 * '* * '* Probability of random variable = X: .0806569 * '* Probability of random variable <= X: .8413447 * '* Probability of random variable >= X: .1586552 * '* * '*************************************************** DEFINT I-N DEFDBL A-H, O-Z DIM B(4) 'used by normal distribution CLS PRINT " Statistical distributions" PRINT PRINT " Tutorial" PRINT PRINT " 1. Input distribution number:" PRINT PRINT " 1: binomial distribution" PRINT " 2: Poisson distribution" PRINT " 3: normal distribution" PRINT " 4: normal distribution (2 variables)" PRINT " 5: chi-square distribution" PRINT " 6: Student T distribution" PRINT PRINT " 2. Define the parameters of chosen distribution" PRINT PRINT " 3. Input value of random variable" PRINT PRINT INPUT " Input distribution number (1 to 6): ", ich CLS IF ich < 1 OR ich > 6 THEN PRINT " Error: Invalid choice!" END END IF 'call appropriate subroutine ON ich GOTO 100, 200, 300, 400, 500, 600 100 PRINT PRINT " Binomial distribution:" PRINT PRINT " P=probability of success" PRINT " N=number of trials" PRINT " X=value of random variable" PRINT INPUT " P = ", p INPUT " N = ", n INPUT " X = ", x GOTO 700 200 PRINT PRINT " Poisson distribution" PRINT PRINT " MU=mean" PRINT " X =value of random variable" PRINT INPUT " MU = ", xm INPUT " X = ", x GOTO 700 300 PRINT PRINT " Normal distribution" PRINT PRINT " MU=mean" PRINT " S =standard deviation" PRINT " X =value of random variable" PRINT INPUT " MU = ", xm INPUT " S = ", s INPUT " X = ", x GOTO 700 400 PRINT PRINT " Normal distribution (2 variables)" PRINT PRINT " MX=mean of X" PRINT " MY=mean of Y" PRINT " SX=standard deviation of X" PRINT " SY=standard deviation of Y" PRINT " RO=correlation coefficient" PRINT " X =value of 1st random variable" PRINT " Y =value of 2nd random variable" PRINT INPUT " MX = ", xm INPUT " SX = ", sx INPUT " MY = ", ym INPUT " SY = ", sy INPUT " RO = ", ro INPUT " X = ", x INPUT " Y = ", y GOTO 700 500 PRINT PRINT " chi-square distribution" PRINT PRINT " NU=number of degrees of freedom" PRINT " X =value of random variable" PRINT INPUT " NU = ", nu INPUT " X = ", x GOTO 700 600 PRINT PRINT " Student's T distribution" PRINT PRINT " NU=number of degrees of freedom" PRINT " X =value of random variable" PRINT INPUT " NU = ", nu INPUT " X = ", x 700 ON ich GOSUB 1000, 2000, 3000, 4000, 5000, 6000 'print results PRINT a\$ = " Probability of random variable = X: " B\$ = " Probability of random variable <= X: " c\$ = " Probability of random variable >= X: " d\$ = " Probability of random variables = X,Y: " IF ich = 4 THEN PRINT d\$; fxy: END IF ich <> 6 THEN GOTO 800 PRINT " Prob(-X<=random variable<=X) = "; bt PRINT B\$; px PRINT c\$; qx END 800 PRINT a\$; fx PRINT B\$; px PRINT c\$; qx END 1000 'Binomial distribution subroutine '**************************************************** '* INPUTS: * '* p: probability of success * '* n: number of trials * '* x: value of random variable * '* OUTPUTS: * '* fx: probability of random variable = X * '* px: probability of random variable <= X * '* qx: probability of random variable >= X * '**************************************************** q = 1# - p: t = p / q n1 = n + 1 fx = q ^ n'fx=prob(0) px = fx IF x = 0 THEN GOTO 1200 FOR i = 1 TO x fx = (n1 - i) * t * fx / i px = px + fx NEXT i 1200 qx = 1# + fx - px RETURN 2000 'Poisson distribution subroutine '**************************************************** '* INPUTS: * '* xm: mean * '* x: value of random variable * '* OUTPUTS: * '* fx: probability of random variable = X * '* px: probability of random variable <= X * '* qx: probability of random variable >= X * '**************************************************** fx = EXP(-xm) px = fx IF x = 0 THEN GOTO 2100 FOR i = 1 TO x fx = fx * xm / i px = px + fx NEXT i 2100 qx = 1# + fx - px RETURN 3000 'normal distribution '**************************************************** '* INPUTS: * '* xm: mean * '* s: standard deviation * '* x: value of random variable * '* OUTPUTS: * '* fx: probability of random variable = X * '* px: probability of random variable <= X * '* qx: probability of random variable >= X * '**************************************************** 'define coefficients B(i) B(0) = 1.330274429# B(1) = -1.821255978# B(2) = 1.781   相关推荐
• VB-txt.rar
程序展示了VBTXT的操作，包含读写txt，搜索行
• VB.NET2008TXT电子书阅读器.zip
使用VB.NET2008开发，仅可以阅读TXT文件，具有电子书阅读器的基本功能
• VB6.0 读取与保存TXT文件实例.rar
使用vb，编译读取txt格式的文本文档，读取数据一目了然，直观。
• vb读取txt程序源代码
vb读取txt程序源代码 vb.net 读取txt文本文件
• VBTXT的操作
VBTXT里面的数据和存储到TXT的操作程序，本人就是通过这个学会如何对TXT读取和写入数据的！
• VB自制TXT文件分割器
VB自制TXT文件分割器_军刀TXT文件分割器源码，浏览所需要分割的TXT文件，选择分割方式，这里有两种TXT分割方式：1、按文件字节分割，用户自定义每次分割的字节大小，2、按平均分割文本，用户指定分割份数，一般按...
• vb操作txt，创建操作
vb.net2010操作txt文档，增加，覆盖，删除等等内容
• vb.net 处理txt文本
vb.net 处理txt文本，vs2008
• vb 2008 抽奖程序 word文档
openFileDialog1.Filter = "txt文件(*.txt)|*.txt" openFileDialog1.Title = "选择一个文本文件" ' Show the Dialog. ' If the user clicked OK in the dialog and ' a .txt file was selected, open it. If...
• qpopper2.53.tar.Z
pop3 server