Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Use Python codes to solve this problem. Thank you! There is a measurement station on the roof of the building you work in that

Please Use Python codes to solve this problem. Thank you!
There is a measurement station on the roof of the building you work in that measures wind
direction and the concentration of Nitrogen (C) in the air. You know from many years of
measurements that when winds are from the east (E), the air that arrives at the measurement
instrument has anomalous Nitrogen concentrations that follow a normal distribution with
mean E=0.2 and St. deviation E=1(note that these are not estimates, these are the true
values of the distribution). On the other hand, winds from the west (W) bring relatively pristine
air that has anomalous Nitrogen concentrations that follow a normal distribution with mean
W=0.0 and St. deviation W=1.
But there is a problem. You just went to check on the instrument, and you found that it is no
longer recording the wind direction or the concentrations! Due to a glitch in the software, all
you know is that the average Nitrogen concentration of the air over the past 100 samples was
?bar(C)100=0.13. Do you think the wind over the last 100 samples was from the east or the west?
(assume that the wind did not change over the past 100 samples, i.e. it was either consistently
from the east or consistently from the west).
Q1. Use hypothesis testing: can you reject the null hypothesis that the air in the last 100
samples is actually air from the west (H0 : The air is from the west)? Use a two-tailed test with
confidence level of 0.05 and describe your steps.
Q2. You start discussing the issue with your boss. After analyzing the wind rose information,
you see that the winds blow out of the west (between SW and NW)40% of the time and that the
winds blow out of the east (between NE and SE)60% of the time. Let denote the fraction of
time the air comes from the west (so,Y=0.4). Use Bayes' Theorem to compute the probability
that the air came from the west over the last 100-sample period.
Q3. You will now explore the sensitivity of your results to the parameter . That is, you want
to understand what would happen if your climatological wind fraction was different (say, if
you repeated this analysis in a different location). Thus, your final result will be a single plot
showing how often the z-statistic from Part (a) guesses the wind direction correctly and how
often the Bayes formulation from Part (b) guesses the wind direction correctly as a function
of , where takes on values between 0 and 1. Explain your results and what they imply about
the two different methods. Be sure to specifically discuss the behavior in the limits of large
and small .
Hints (For Q3): To set up this problem, you will design and run Monte Carlo experiments to
simulate this physical situation. For each in[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1], write
code to:
(1) Randomly choose which scenario to run according to the probability Y,(generate a
random number from U(0,1) : if it is Y, then "winds are from the west", otherwise "winds are
from the east").
(2) Based on (1), generate N=100 random concentration values from the underlying
distributions (see problem statement), and calculate their average ?bar(C)N.
(3) Use the methods from (a) and (b) to calculate whether the z-test and Bayesian approach
conclude that the wind was from the west given the ?bar(C)N you calculated.
(4) Compare what the z-test and Bayesian approaches said to the truth (the truth is the
scenario that you actually used in (1)) and keep track of how often each method guesses the
correct scenario.
Repeat (1-4) many times (>1000) for each different Y value. Plot a figure of the frequency of
success of each of the two methods as a function of .
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago