![概率論第二次試驗_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/4/61647267-5f1c-4949-9628-d8b44991997d/61647267-5f1c-4949-9628-d8b44991997d1.gif)
![概率論第二次試驗_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/4/61647267-5f1c-4949-9628-d8b44991997d/61647267-5f1c-4949-9628-d8b44991997d2.gif)
![概率論第二次試驗_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/4/61647267-5f1c-4949-9628-d8b44991997d/61647267-5f1c-4949-9628-d8b44991997d3.gif)
![概率論第二次試驗_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/4/61647267-5f1c-4949-9628-d8b44991997d/61647267-5f1c-4949-9628-d8b44991997d4.gif)
![概率論第二次試驗_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-11/4/61647267-5f1c-4949-9628-d8b44991997d/61647267-5f1c-4949-9628-d8b44991997d5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、概率論第二次試驗報告 姓 名 楊帆學(xué) 號:4012014057姓 名 楊藍(lán)學(xué) 號:4012014025姓 名 張藝朋學(xué) 號:4012014047123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899010203040506070809101112131415161718192
2、021222324252627282930313233343536 #正態(tài)分布#第一問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")#第二問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")#二項分布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 = "二項分布概率分布圖")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)#二項分布的泊松逼近x <- seq(0, 40, 1)plot(x,dbinom(x, size=40,prob=0.2, log = FALSE), type = "p", ylab = "F(x)", main = "二項分布的泊松逼近")curve(dpois(x,lambda = 8, log = FALSE),type = "p",col="
11、;red",ylim=c(0,1), xlim=c(0,10),add = TRUE)mtext("-二項分布B(k;40,0.2) ", adj = 1,line = -1)mtext("-泊松分布(8) ", adj = 1, line = -2,col="red")#服務(wù)窗口問題#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為排隊人數(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, )#高爾頓釘板實驗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 = "高爾頓釘板實驗",ylab="出
14、現(xiàn)的次數(shù)",xlab="球的位置")#畫出直方圖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 = "高爾頓釘板實驗",ylab="出現(xiàn)的次數(shù)",xlab="球的位置")#畫出直方圖 zhixing(Vector=1:
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中國非道路發(fā)動機(jī)行業(yè)發(fā)展運(yùn)行現(xiàn)狀及投資戰(zhàn)略規(guī)劃報告
- 2024年節(jié)能減排市場運(yùn)行態(tài)勢及行業(yè)發(fā)展前景預(yù)測報告
- 中國潛水曝氣機(jī)行業(yè)市場發(fā)展監(jiān)測及投資戰(zhàn)略咨詢報告
- 知識產(chǎn)權(quán)交易與融資策略的未來趨勢
- 二零二五年度綠色辦公園區(qū)使用權(quán)租賃服務(wù)協(xié)議
- 纖體瘦身足指環(huán)行業(yè)市場發(fā)展及發(fā)展趨勢與投資戰(zhàn)略研究報告
- 高效冰箱壓縮機(jī)零部件項目可行性研究報告建議書立項
- 工業(yè)污水廠可行性研究報告
- 會所工裝服務(wù)合同范本
- 單位借款合同范例范例
- 四年級上冊音樂《楊柳青》課件PPT
- 安徽省廬陽區(qū)小升初語文試卷含答案
- 人教版初中英語八年級下冊 單詞默寫表 漢譯英
- 蘇教版六年級數(shù)學(xué)下冊《解決問題的策略2》優(yōu)質(zhì)教案
- 《靜脈治療護(hù)理技術(shù)操作規(guī)范》考核試題及答案(共140題)
- 英國文學(xué)8.2講解Sonnet18
- 人事測評理論與方法-課件
- 最新卷宗的整理、裝訂(全)課件
- 人教版部編道德與法治三年級下冊全冊全套課件
- 信訪事項受理、辦理、復(fù)查、復(fù)核、聽證程序課件
- 【北京】施工現(xiàn)場安全生產(chǎn)標(biāo)準(zhǔn)化管理圖集
評論
0/150
提交評論