ENGSCI / STATS 255 SC Assignment 3

1.空中奥特罗阿舰队人数（25分）
Aotearoa航空公司是一家航空公司，受到新西兰航空公司的重创。

D1：维持现有机队（每年提供2，250,000个席位）；
D2：适度减少（每年提供1,250,000个席位）；
D3：大幅减少（每年提供625,000个席位）。

2021年对空中Aotearoa航班的需求尚不确定，并将取决于许多相关因素

S1：需求严重减少；
S2：适度减少需求；
S3：正常需求。

D1 D2 D3
S1 \$ 30 \$ 40 \$ 60
S2 \$ 50 \$ 80 \$ 100
S3 \$ 80 \$ 100 \$ 150
（a）仅考虑门票销售的收益（基于门票的价格和数量）

（b）如果航空Aotearoa乐观，最好的决定是什么？解释为什么。
（c）如果航空Aotearoa悲观，最好的决定是什么？解释为什么。
（d）如果Aotearoa航空公司希望最大程度地减少自己的最大遗憾，那是最佳决定？显示所有

（e）针对这种情况绘制并标记决策树，并计算最佳决策，假定

（f）计算完美信息的期望值。显示所有工作。

The Air Aotearoa’s operations research team approaches an epidemiologist to seek advice about the persistence of the pandemic into 2021. The epidemiologist believes that there’s a probability of 0.2 that the pandemic have a significant impact in 2021, and 0.8 probability that it will have a minor impact; moreover, the (conditional) probability distributions for the three demand scenarios are given in the table below.
Pandemic Impact
significant minor
S1 0.800 0.175
S2 0.200 0.575
S3 0.000 0.250
(g) Assuming risk-neutrality, how much would Air Aotearoa be willing to pay to know whether the impact of the pandemic in 2021 will be significant or minor, prior to making a decision about reducing the fleet size?
Suppose that Air Aotearoa is risk-averse, with utility function: U(π) = √3 π − 70, where π is the payoff in \$millions.
(h) If making the investment decision, without the additional advise from the epidemiologist, compute Air Aotearoa’s expected utility for each decision on fleet size. Which decision should Air Aotearoa choose, and why?
(i) What is the CEV associated with the decision determined in (h)?

2. New Zealand Electricity Sector (25 marks)
The New Zealand electricity sector comprises a multi-nodal market, with generators, retailers, transmission and distribution. In this question we will be looking at the generation of power in 2018.
Generation data (in kWh) is collected on a half-hourly basis from 64 generation sites across New Zealand. We wish to use this data to investigate how different generation technologies contribute to
New Zealand’s electrical energy mix.
For this question you need to first install RStudio (or use rstudio.cloud), and download generation.csv,
plants.csv and regions.csv from Canvas. Remember to first load the tidyverse library, and then import generation.csv and plants.csv into R.
(a) Use the match function to create Fuel, Region and Emissions (in kg CO2e / kWh) attributes in the generation data set, by matching the nodal information with the plants data set.
Hint: for Fuel you will need to complete this command:
> generation\$Fuel=as.factor(plants\$Fuel[match( , )])
(b) Filter the data in the generation data set to create a new data set called windgen containing only data about wind generators.
(c) Create a pairs plot that compares wind generation in different trading periods each day. Since 48 half-hour trading periods are too many to show on a pairs plot, select the trading periods 1,3, 5, 7, 9, 11 to include in your plot. Comment on any observations.
(d) Use the gather function to reshape the generation data set so that it has a single generation output attribute kWh for all trading periods, you should set the key to be TP).
Hint: you can use the starts with( ) function, instead of listing all columns to ‘gather’.
(e) Use the group by() and summarise( , ( ,na.rm=TRUE)) functions to display the total generation (in kWh) by Fuel type.