




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、概率論第二次試驗(yàn)報(bào)告 姓 名 楊帆學(xué) 號(hào):4012014057姓 名 楊藍(lán)學(xué) 號(hào):4012014025姓 名 張藝朋學(xué) 號(hào):4012014047123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899010203040506070809101112131415161718192
2、021222324252627282930313233343536 #正態(tài)分布#第一問(wèn)curve(dnorm(x,mean = -2,sd=1,log=FALSE),type = "l",add = TRUE,xlim=c(-5,5),ylim=c(0,1),ylab = "概率")curve(dnorm(x,mean = 0,sd=1,log=FALSE),type = "l",add = TRUE,col="red")curve(dnorm(x,mean = 2,sd=1,log=FALSE),type = &
3、quot;l",add = TRUE,col="green")curve(pnorm(x,mean = -2,sd=1),type = "l",add = TRUE)curve(pnorm(x,mean = 0,sd=1,lower.tail = TRUE,log.p = FALSE),type = "l",add = TRUE,col="red")curve(pnorm(x,mean = 2,sd=1,lower.tail = TRUE,log.p = FALSE),type = "l&quo
4、t;,add = TRUE,col="green")title(main = "正態(tài)分布")mtext("-單調(diào)的是分布函數(shù)", adj = 1,line = -1)mtext("-不單調(diào)的是概率密度", adj = 1, line = -2)text(x=-3,y=0.6,labels="= -2")text(x=-1,y=0.6,labels="= 0",col="red")text(x=1,y=0.6,labels="= -2",
5、col="green")#第二問(wèn)curve(dnorm(x,mean = 0,sd=0.5,log=FALSE),type = "l",add = TRUE,lwd=4,xlim=c(-5,5),ylim=c(0,1),ylab = "概率")curve(dnorm(x,mean = 0,sd=1,log=FALSE),type = "l",add = TRUE,col="red")curve(dnorm(x,mean = 0,sd=2,log=FALSE),type = "l&quo
6、t;,add = TRUE,col="green")curve(pnorm(x,mean = 0,sd=0.5),type = "l",add = TRUE)curve(pnorm(x,mean = 0,sd=1,lower.tail = TRUE,log.p = FALSE),type = "l",add = TRUE,col="red")curve(pnorm(x,mean = 0,sd=2,lower.tail = TRUE,log.p = FALSE),type = "l",add =
7、TRUE,col="green")title(main = "正態(tài)分布")mtext("-單調(diào)的是分布函數(shù)", adj = 1,line = -1)mtext("-不單調(diào)的是概率密度", adj = 1, line = -2)text(x=-3,y=0.6,labels="= -2")text(x=-1,y=0.6,labels="= 0",col="red")text(x=1,y=0.6,labels="= -2",col="
8、;green")#泊松分布x<-seq(0,30)plot(x,dpois(x,1),type="b")lines(x,dpois(x,2),type="b",col="red")lines(x,dpois(x,3),type="b",col="green")lines(x,dpois(x,6),type="b",col="blue")#二項(xiàng)分布p<-0.2x<-seq(0, n, by = 1)f= choose(10,x)
9、* px * (1-p)(10-x) p= choose(20,x) * px * (1-p)(20-x) g= choose(50,x) * px * (1-p)(50-x) plot(x,g, type = "l", ylab = "p(x)",main = "二項(xiàng)分布概率分布圖")lines(x,p, col = "red", lwd = 2)lines(x,f, col = "green", lwd = 2)mtext("f = choose(n,x) * px * (1-p)
10、(n-x) ", adj = 0)mtext("最大概率", adj = 0, line = -1, font = 4)#二項(xiàng)分布的泊松逼近x <- seq(0, 40, 1)plot(x,dbinom(x, size=40,prob=0.2, log = FALSE), type = "p", ylab = "F(x)", main = "二項(xiàng)分布的泊松逼近")curve(dpois(x,lambda = 8, log = FALSE),type = "p",col="
11、;red",ylim=c(0,1), xlim=c(0,10),add = TRUE)mtext("-二項(xiàng)分布B(k;40,0.2) ", adj = 1,line = -1)mtext("-泊松分布(8) ", adj = 1, line = -2,col="red")#服務(wù)窗口問(wèn)題#m_plot<-array(0,dim = c(1:15)#m_x<-array(0,dim = c(1:15)a<-0b<-0p<-0.1n<-200 #ns<-3 #s為排隊(duì)人數(shù)shiyan_nu
12、m<-1000alpha<-0.8 for (m in 1:15) b=0 for (j in 1:shiyan_num) a=0 for (i in 1:n) x=rbinom(1,1,p) if(x=1) a=a+1Z if(a<=m*s) b=b+1 # m_plot1,m<-b/shiyan_num print(b/shiyan_num)#plot(m_x1, ,m_plot1, )#高爾頓釘板實(shí)驗(yàn)n<-5000zhixing<-function(p =0.3,Vector=1:n) Count.location=seq(from=0,to=0,le
13、ngth.out=length(Vector) j<-1 for(i in Vector) path<-sample(c(-1,1),20,replace=TRUE,prob=c(p,1-p)#用-1表示左走,用1表示右走 location<-sum(path) #location代表球向左或向右走|location|步 Count.locationj<-location j<-j+1 hist(Count.location,xlim=c(-20,20),ylim=c(1,2000), main = "高爾頓釘板實(shí)驗(yàn)",ylab="出
14、現(xiàn)的次數(shù)",xlab="球的位置")#畫(huà)出直方圖zhixing(p=0.15) #分別執(zhí)行p=0.5,p=0.85#zhixing(p=0.5)#zhixing(p=0.85)zhixing<-function(p =0.3,Vector=1:5000) Count.location=seq(from=0,to=0,length.out=length(Vector) j<-1 for(i in Vector) path<-sample(c(-1,1),20,replace=TRUE,prob=c(p,1-p)#用-1表示左走,用1表示右走 location<-sum(path) #location代表球向左或向右走|location|步 Count.locationj<-location j<-j+1 hist(Count.location,xlim=c(-20,20),ylim=c(1,2000), main = "高爾頓釘板實(shí)驗(yàn)",ylab="出現(xiàn)的次數(shù)",xlab="球的位置")#畫(huà)出直方圖 zhixing(Vector=1:
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年矯味劑項(xiàng)目合作計(jì)劃書(shū)
- 內(nèi)二科護(hù)理工作計(jì)劃(31篇)
- 2024年注冊(cè)會(huì)計(jì)師考試知識(shí)點(diǎn)總結(jié)試題及答案
- 如何建立寶寶的良好作息試題及答案
- 監(jiān)理工程師復(fù)習(xí)問(wèn)答試題及答案
- 2025年智能兒童成長(zhǎng)儀合作協(xié)議書(shū)
- 國(guó)際物流師面試案例分析試題及答案
- 育嬰師職業(yè)角色探討試題及答案
- 投資管理中的信任建立技巧試題及答案
- 中職電子商務(wù)教師資格證復(fù)習(xí)資料與答案
- 秸稈破壁菌酶研發(fā)項(xiàng)目可行性研究報(bào)告(范文參考)
- 2025新疆機(jī)場(chǎng)(集團(tuán))有限責(zé)任公司阿克蘇管理分公司第一季度招聘(75人)筆試參考題庫(kù)附帶答案詳解
- 全國(guó)計(jì)算機(jī)等級(jí)考試《三級(jí)信息安全技術(shù)》專用教材【考綱分析+考點(diǎn)精講+真題演練】
- 生豬屠宰獸醫(yī)衛(wèi)生檢驗(yàn)人員理論考試題庫(kù)及答案
- 小學(xué)數(shù)學(xué)主題活動(dòng)設(shè)計(jì)一年級(jí)《歡樂(lè)購(gòu)物街》
- 體外循環(huán)意外時(shí)麻醉醫(yī)生該做些什么?
- (完整word版)男襯衫的制作工藝
- 家和萬(wàn)事興-善人道
- 信用社(銀行)清產(chǎn)核資實(shí)施方案
- 幼兒園大班語(yǔ)言活動(dòng)《熟能生巧》優(yōu)質(zhì)課公開(kāi)課教案比賽講課獲獎(jiǎng)教案
- 九族五服表(九族五服圖)
評(píng)論
0/150
提交評(píng)論