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

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

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

2、程中向右偏移的總次數(shù)int rand ;/ 隨機(jī)數(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 / 輸出結(jié)果System.out.println( 小球的總數(shù)為+sumOfBall+t 格子的個(gè)數(shù)為 +sumOfGrid );for( int index = 0; index System.out.println( (index+1)+號(hào)格

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

溫馨提示

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

評(píng)論

0/150

提交評(píng)論