加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫(xiě)COMPSCI369、代做Python編程設(shè)計(jì)

時(shí)間:2024-05-10  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



COMPSCI369 - S1 2024
Assignment 3
Due date: See Canvas
Instructions
This assignment is worth 7.5% of the final grade. It is marked out of 75 points.
Provide a solution as a Python notebook and html with output. Your solution should include well
documented code with the calls to reproduce your results.
Include markdown cells with explanation of the results for each question.
Submit the ipynb and html to Canvas:
• the .ipynb file with outputs from the executed code
• a .html version of the notebook with all outputs of executed code showing. (To get this
format, export from the notebook viewer or use nbconvert.)
Within the notebook, set the random seed to some integer of your choosing (using random.seed)
so that the marker can recreate the same output that you get. You can reset the seed before each
question if you like.
Question 1: Simulating random variables and exploring relationships between distributions (20 Points)
(a) Using the inversion sampling technique described in Section 9.2 of the workbook, write a method rand exp that takes a rate parameter λ as input and
produces as output an exponentially distributed random variable with rate parameter λ. Use random.random() to generate uniform random numbers. (4
marks)
(b) Demonstrate your rand exp is correct by comparing the mean and variance
of the output to theoretical values, and also by comparing the output of your
method to a library method. (4 marks)
(c) Use rand exp to write a method rand poiss that takes a parameter λ as input
and produces as output a Poisson distributed random variable with parameter
λ. (4 marks)
(d) Use rand exp to write a method rand gamma that takes an integer parameter
k and rate parameter θ as input and produces as output a gamma distributed
random variable with parameters k and θ. (4 marks)
(e) Explain why your rand gamma method lacks the generality you would typically
want for simulating gamma distributed random variables. (4 marks)
1
Question 2: Simulating outbreaks (55 Points)
A standard model in epidemiology is the SIR model of infectious disease spread. It
has a population of N hosts being divided into 3 compartments, so is known as a
compartmental model:
• the S compartment of those who are susceptible to the disease
• the I compartment of those who are infectious with the disease
• the R compartment of those who are recovered from the disease and now immune (or, more generally, those who are removed from the epidemic through
recovery with immunity, or isolation, or death, etc).
We assume that S + I + R = N.
The model can be deterministic or stochastic. We consider the stochastic version
here. Times between all events are exponentially distributed with the following rates
which depend on the current state of the outbreak, assumed to be (S, I, R):
• the rate of transmissions is βSI/N and the new state is (S − 1, I + 1, R), and
• the rate of recoveries is γI and the new state is (S, I − 1, R + 1).
You can use any functions from the random module that you like for this question.
Probably the only one you need is random.expovariate.
(a) At what point will the epidemic finish? (2 marks)
(b) Write method sim SIR that takes as inputs N, I0, β, γ and produces as output
a list of the event times and the number susceptible, infected and recovered at
each time point. All outbreaks start at time t = 0 with S0 = N −I0. (8 marks)
(c) Run a simulation with N = 1000, I0 = 10, β = 3, γ = 2 and plot the number
infected through time. (4 marks)
(d) Run an experiment and report the results to approximate the probability that
a large outbreak occurs using the same parameters as above but with only one
initial infected. What has usually happened if there is no large outbreak? (6
marks)
(e) The reproduction number R0 = β/γ of the epidemic is the mean number of
transmissions by a single infected in an otherwise susceptible population (Note
there is a bit of a notation clash: we are not referring to the number of recovered
individuals at time 0 in this case.) Using the same parameters as in part (c)
but allowing β to vary, select five values of R0 above and below 1 to explore
whether or not you get an outbreak. Report and explain your results. (6
marks)
(f) Suppose now that the infectious period is fixed, so that hosts are infectious
for exactly 1 time unit. Is the process still Markov? How would you go about
writing code to simulate such an epidemic? (You do not have to actually write
the code here.) (4 marks)
2
(g) Another common model breaks the infectious period up into m sub-periods,
I1, I2, . . . , Im so is an SI1I2 . . . ImR model. Assuming the amount of time each
individual spends in compartment Ij
is exponential with rate γ, what is the
distribution of the total time spent in I1 to Im? (4 marks)
(h) Drawing on what you know about infections, explain why neither a fixed length
nor an exponential distributed infectious period is a great model and why the
m sub-period model may be preferable. What computational advantage does
this formalism have that makes it easier to work with than some arbitrary
distribution for the infection period? (6 marks)
(i) Consider another compartmental model where there is no immunity to an infection so individuals recover straight back into a susceptible state and can get
infected again. This is know as birth death or SIS process. If we look at only
the type of events and ignore the waiting times between them, this process can
be described as a simple Markov chain. If the population size were fixed at
N = 5, and using transition rates (S, I) → (S − 1, I + 1) at rate βSI/N and
(S, I) → (S + 1, I − 1) at rate γI, write down the transition matrix for the
chain. (5 marks)
(j) Implement an SIS process which takes inputs N, I0, β, γ, t, where t is the number
of iterations (i.e., infection or recovery events) the simulation runs for. (6
marks)
(k) Run a simulation study using the SIS simulator with N = 1000, I0 = 10, β =
3, γ = 2 to determine the long term behaviour of this process. Discuss your
results. (4 marks)

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp














 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:菲律賓碧瑤到務(wù)宿多久 宿務(wù)的景點(diǎn)有什么
  • 下一篇:代寫(xiě)CPT204、代做Java編程設(shè)計(jì)
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    日韩一区二区在线免费| 日韩成人伦理电影在线观看| 99在线精品视频在线观看| 日韩黄色小视频| 久久久久黄色| 视频在线观看一区| 久久久成人网| 亚洲另类av| 六月婷婷色综合| av中文资源在线资源免费观看| 久久97久久97精品免视看秋霞| 国产成人一区| 麻豆精品一区二区三区| 欧美特黄aaaaaaaa大片| 亚洲综合不卡| 亚洲精品国产偷自在线观看| 成人av影音| 亚洲国产欧美日韩在线观看第一区| 国产精品夜夜夜| 97久久视频| 99成人在线| 在线成人动漫av| 成人av地址| 精品国产一区二区三区性色av | 国产精品视频3p| 欧一区二区三区| 亚洲国产一区二区三区a毛片| 日韩在线免费| av资源亚洲| 91综合在线| 久久亚洲不卡| 视频在线观看一区二区三区| 91久久亚洲| 91成人免费| 制服丝袜日韩| 国产精品99免费看| 久久久人成影片免费观看| 97精品久久| 国产精品极品国产中出| 亚洲网址在线观看| 99久久婷婷国产综合精品青牛牛 | 欧美日韩网站| 动漫视频在线一区| 91欧美极品| 亚洲高清在线一区| 51vv免费精品视频一区二区| 国产一区国产二区国产三区| 国产一区二区电影在线观看| 国产麻豆精品久久| 亚洲系列另类av| 精品久久亚洲| 一区二区免费| 欧美久久香蕉| 久久婷婷久久| 久久亚洲影视| 黄色成人精品网站| 美女诱惑一区| sm久久捆绑调教精品一区| 午夜欧美激情| 青青国产精品| 美女精品一区二区| 久久视频在线观看| 国产亚洲一卡2卡3卡4卡新区 | 久久av综合| 日韩精品亚洲专区在线观看| 日韩中文字幕在线一区 | 欧美精品一二| 亚洲经典在线看| 蜜桃91丨九色丨蝌蚪91桃色 | 国产福利一区二区精品秒拍| 久久久777| 中文国产一区| 少妇淫片在线影院| 欧美成人xxxx| av日韩一区| 视频精品一区| 中国av一区| 四季av在线一区二区三区| 亚洲成人不卡| 日本成人超碰在线观看| 亚洲精华一区二区三区| 91免费精品国偷自产在线在线| 久久激情电影| 丝袜美腿一区二区三区| 国产第一亚洲| 国产欧美高清视频在线| 欧美综合自拍| 中文在线一区| 国产精品字幕| 91视频亚洲| 青草久久视频| 久久亚洲欧洲| 国产精品久久久久久模特| 国产成人精品999在线观看| 国产精品网站在线看| 国产精品丝袜xxxxxxx| 韩国精品主播一区二区在线观看| 亚洲区综合中文字幕日日| 欧美日韩午夜| 久久亚洲国产精品一区二区| 丰满少妇一区| 日本免费一区二区三区视频| 国产伊人精品| 先锋欧美三级| 最新国产精品视频| 美女久久久久| 欧美视频免费看| 日韩大胆成人| 好看不卡的中文字幕| 懂色aⅴ精品一区二区三区| 日韩电影不卡一区| 中文国产一区| 美女视频一区二区| 98视频精品全部国产| 丝袜诱惑制服诱惑色一区在线观看| 国产欧美一区二区色老头| 国产免费av国片精品草莓男男| 国产精品视区| 日本成人中文字幕在线视频| 日本a口亚洲| 亚洲性色av| 日韩精品亚洲专区在线观看| 免费看黄裸体一级大秀欧美| 久久精品一区二区三区中文字幕| 一区二区亚洲视频| 日韩1区2区| 国产一区网站| 视频在线观看一区二区三区| 宅男噜噜噜66国产精品免费| 国产高清一区| 欧美一区二区三区免费看| 国产伦理久久久久久妇女| 岛国av在线网站| 九九九九九九精品任你躁 | 成人mm视频在线观看| 9国产精品午夜| 三区四区不卡| 日韩av一区二区三区四区| 可以看av的网站久久看| 国产一区二区三区天码| 巨乳诱惑日韩免费av| 国产亚洲精品美女久久久久久久久久| 91久久夜色精品国产九色| 一区二区电影| 亚洲一区国产| 国产欧美日本| 国产精品久久占久久| 日本人妖一区二区| 深夜福利视频一区二区| 日本精品国产| 欧美日韩精品免费观看视欧美高清免费大片| 9l视频自拍蝌蚪9l视频成人| 女海盗2成人h版中文字幕| 精品国产欧美日韩| 亚洲国产国产亚洲一二三| 国产韩国精品一区二区三区| 蓝色福利精品导航| 激情91久久| 久久综合色占| 日韩三区免费| 久久中文字幕av| 亚洲精品激情| 久久最新视频| 999精品视频在这里| 久久精品资源| 亚洲在线一区| 一区二区三区高清在线观看| 欧美一区二区三区婷婷| 精品日韩毛片| 日韩成人一区二区| 神马久久资源| 伊人久久大香线| 亚州国产精品| 精品成人免费一区二区在线播放| 亚洲二区视频| 国产影视精品一区二区三区| 日韩中字在线| 亚洲激情成人| 免费看一区二区三区| 日韩国产在线观看一区| 亚洲在线免费| 精品国产一区二区三区av片 | 中文字幕一区二区精品区| 日韩av免费大片| 久久高清精品| 精品午夜av| 日韩高清不卡在线| 中文字幕在线高清| 欧洲杯足球赛直播| 久久国产精品美女| 国产欧美亚洲一区| а√天堂8资源中文在线| 亚洲视频综合| 亚洲超碰在线观看| 欧美日韩专区| 97精品国产综合久久久动漫日韩| 奶水喷射视频一区| 久久在线视频免费观看| 日韩精品免费一区二区夜夜嗨 | 在线国产一区|