高爾頓板實驗動態(tài)演示_第1頁
高爾頓板實驗動態(tài)演示_第2頁
高爾頓板實驗動態(tài)演示_第3頁
高爾頓板實驗動態(tài)演示_第4頁
高爾頓板實驗動態(tài)演示_第5頁
已閱讀5頁,還剩2頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、 / 7高爾頓板實驗動態(tài)演示篇一 : 高爾頓釘板試驗模擬( 程序 ) 高爾頓釘板試驗模擬(程序). 這是我 2005年 12的課程設計中程序的核心部分,寫完后自己非常得意,等著老師表揚。等啊等,等待現(xiàn)在也沒等到:em16:現(xiàn)將它獻給大家(若有版權那遵守BSDAE)注1:程序以前是用Matlab 寫的現(xiàn)用Java 重寫注2:原程序中galton 返回值為int grid 、沒有“輸出結果”部分public void galton(int sumOfGrid, intsumOfBall) int grid = new intsumOfGrid;int number = 0;/ 一個小球從頂端落下過

2、程中向右偏移的總次數(shù)int rand ;/ 隨機數(shù),取值范圍為0,1 ,為 0、為 1 的概率相等for( int counter_ball = 1; counter_ball/ (sumOfGrid - 1) 為釘板的層數(shù)for( int times = 1; times gridnumber+; number = 0; TOC o 1-5 h z / 輸出結果System.out.println( 小球的總數(shù)為+sumOfBall+t 格子的個數(shù)為 +sumOfGrid );for( int index = 0; index System.out.println( (index+1)+號格

3、子中的小球數(shù)為:t+gridindex );/end of metod galton補充: ( 謝謝 2 樓提醒 :-D )高爾頓釘板試驗:自板上端放入一小球, 任其自由落下. 在下落過程中 , 當小球碰到釘子時, 從左邊落下與從右邊落下的機會相等. 碰到下一排釘子也是如此. 自板上端放入n(n 自行輸入 ) 個小球 , 觀察小球落下后呈現(xiàn)曲線并統(tǒng)計小球落入各個格子的頻率.高爾頓釘板試驗可見概率論(復旦大學李賢平)當小球數(shù)量少時分布無明顯特征,當小球數(shù)量多時(100)分布近似正態(tài)分布。(即兩邊對稱:-D ) 當時為了證明服從正態(tài)分布投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). 高爾頓板實驗動態(tài)演示篇二:高爾頓釘板R語言實驗高爾頓釘板試驗【實驗目的】1、加強對正態(tài)分布的理解2、了解獨立同分布的中心極限定理3、掌握R在計算機模擬中的應用【實驗要求】1、了解R 程序文件的建立和運行,理解循環(huán)等控制語句的應用。2、了解R的程序設計,掌握用R處理實際問題的能力?!緦嶒瀮?nèi)容】高爾頓釘板試驗,這個試驗是英國科學家高爾頓設計的,具體如下:自板上端放一個小球,任其自由下落。在其下落過程中,當小球碰到釘子時從左邊落下的概率為p,從右邊落下的概率為1-p,碰到下一排釘子又是如此,最后落到底板中的某一格子,因此任意放入一球,則此球落入哪個格子事先難以確定(設橫排共有m=20非釘子,每一排釘子等距排列,下一排每個釘子恰好在上一排兩相鄰釘子中間)。( 1) 分別取 p=0.1

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論