版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 / 7高尔顿板实验动态演示篇一 : 高尔顿钉板试验模拟( 程序 ) 高尔顿钉板试验模拟(程序). 这是我 2005年 12的课程设计中程序的核心部分,写完后自己非常得意,等着老师表扬。等啊等,等待现在也没等到:em16:现将它献给大家(若有版权那遵守BSDAE)注1:程序以前是用Matlab 写的现用Java 重写注2:原程序中galton 返回值为int grid 、没有“输出结果”部分public void galton(int sumOfGrid, intsumOfBall) int grid = new intsumOfGrid;int number = 0;/ 一个小球从顶端落下过
2、程中向右偏移的总次数int rand ;/ 随机数,取值范围为0,1 ,为 0、为 1 的概率相等for( int counter_ball = 1; counter_ball/ (sumOfGrid - 1) 为钉板的层数for( int times = 1; times gridnumber+; number = 0; TOC o 1-5 h z / 输出结果System.out.println( 小球的总数为+sumOfBall+t 格子的个数为 +sumOfGrid );for( int index = 0; index System.out.println( (index+1)+号格
3、子中的小球数为:t+gridindex );/end of metod galton补充: ( 谢谢 2 楼提醒 :-D )高尔顿钉板试验:自板上端放入一小球, 任其自由落下. 在下落过程中 , 当小球碰到钉子时, 从左边落下与从右边落下的机会相等. 碰到下一排钉子也是如此. 自板上端放入n(n 自行输入 ) 个小球 , 观察小球落下后呈现曲线并统计小球落入各个格子的频率.高尔顿钉板试验可见概率论(复旦大学李贤平)当小球数量少时分布无明显特征,当小球数量多时(100)分布近似正态分布。(即两边对称:-D ) 当时为了证明服从正态分布投1 千万个小球(计算机模拟:-D )Galton Board
4、The Galton board, also known as a quincunx or bean machine, is a device for statistical experiments named after English scientist Sir Francis Galton. It consists of an upright board with evenly spaced nails (or pegs) driven into its upper half, where the nails are arranged in staggered order, and a
5、lower half divided into a number of evenly-spaced rectangular slots. The front of the device is covered with a glass cover to allowviewing of both nails and slots. In the middle of the upper edge, there is a funnel into which balls can be poured, where the diameter of the balls must be much smaller
6、than the distancebetween the nails. The funnel is located precisely above the central nail of the second row so that each ball, if perfectly centered, would fall vertically and directly onto the uppermost point of this nails surface (Kozlov and Mitrofanova 2002). The figure above shows a variant of
7、the board in which only the nails that can potentially be hit by a ball dropped from the funnel are included, leading to a triangular array instead of a rectangular one.Each time a ball hits one of the nails, it can bounce right (or left) with someprobabilityp(and q1p). For symmetricallyplaced nails
8、, balls will bounce left or right with equal probability, so p q 1/2. If the rows are numbered from 0 to N 1, he path of each falling ball is a Bernoulli trial consisting ofNsteps. Each ball crosses the bottom row hitting the nth peg from the left (where。 n N 1) if it has taken exactly right turns,
9、which occurs with probabilityThis process therefore gives rise to a binomial distribution of in the heights of heaps of balls in the lower slots.If the number of balls is sufficiently large and, then according to the weak law of large numbers, the distribution of the heights of the ball heaps will a
10、pproximate a normaldistribution.Somecare is needed to obtain these idealized results, however, as the actual distribution of balls depends on physicalproperties of the setup, including the elasticity of the balls(as characterized by their coefficient of restitution), theradius of the nails, and the
11、offsets of the balls over thefunnels opening whenthey are dropped (Kozlov and Mitrofanova 2002). 高尔顿板实验动态演示篇二:高尔顿钉板R语言实验高尔顿钉板试验【实验目的】1、加强对正态分布的理解2、了解独立同分布的中心极限定理3、掌握R在计算机模拟中的应用【实验要求】1、了解R 程序文件的建立和运行,理解循环等控制语句的应用。2、了解R的程序设计,掌握用R处理实际问题的能力。【实验内容】高尔顿钉板试验,这个试验是英国科学家高尔顿设计的,具体如下:自板上端放一个小球,任其自由下落。在其下落过程中,当小球碰到钉子时从左边落下的概率为p,从右边落下的概率为1-p,碰到下一排钉子又是如此,最后落到底板中的某一格子,因此任意放入一球,则此球落入哪个格子事先难以确定(设横排共有m=20非钉子,每一排钉子等距排列,下一排每个钉子恰好在上一排两相邻钉子中间)。( 1) 分别取 p=0.1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年江宁高职语文教资笔试题及答案
- 2025年乡镇医院事业编考试题目及答案
- 2025年湖南科技大学的面试题库及答案
- 2025年宁波国企结构化面试题库及答案
- 2025年乳山潘文博事业单位考试及答案
- 2025年齐河县大黄乡事业编考试及答案
- 2025年半个月冲刺事业单位考试及答案
- 某玩具公司玩具零部件加工规范
- “过程方法”和“PDCA 循环”在 ISO 9001-2026“4.1 理解组织及其环境”条款中的应用指南(雷泽佳编制-2026A0)
- 雪弗兰介绍教学课件
- 2025年幼儿园中、高级教师职称考试(综合素质)综合试题及答案
- 2025年福建省考申论试题及答案
- 2025年新课标综合卷高考真题理综试卷(含答案)
- JJG 264-2025 谷物容重器检定规程
- 坟地长期租赁协议书
- 成人脑室外引流护理团体标准解读
- 大学美育(同济大学)学习通测试及答案
- 《事故快速处理协议书》电子版
- 2024年中国西电集团有限公司招聘笔试参考题库含答案解析
- 化学品安全技术说明(木质素磺酸钠)
- R32装置操作规程
评论
0/150
提交评论