SlideShare a Scribd company logo
1 of 30
Chi-squared Goodness of Fit Test Project
Overview and Rationale
This assignment is designed to provide you with hands-on
experience in generating
random values and performing statistical analysis on those
values.
Course Outcomes
This assignment is directly linked to the following key learning
outcomes from the course
syllabus:
• Use descriptive, Heuristic and prescriptive analysis to drive
business strategies and
actions
Assignment Summary
Follow the instructions in this project document to generate a
number of different random
values using random number generation algorithm in Excel, the
Inverse Transform. Then
apply the Chi-squared Goodness of Fit test to verify whether
their generated values belong
to a particular probability distribution. Finally, complete a
report summarizing the results
in your Excel workbook. Submit both the report and the Excel
workbook.
The Excel workbook contains all statistical work. The report
should explain the
experiments and their respective conclusions, and additional
information as indicated in
each problem. Be sure to include all your findings along with
important statistical issues.
Format & Guidelines
The report should follow the following format:
(i) Introduction
(ii) Analysis
(iii) Conclusion
And be 1000 - 1200 words in length and presented in the APA
format
Project Instructions:
The project consists of 4 problems and a summary set of
questions. For each problem, tom
hints and theoretical background is provided.
Complete each section in a separate worksheet of the same
workbook (Excel file). Name
your Excel workbook as follows:
ALY6050-Module 1 Project – Your Last Name – First
Initial.xlsx
In the following set of problems, r is the standard uniform
random value (a continuous
random value between 0 and 1).
Problem 1
Generate 1000 random values r. For each r generated, calculate
the random value �� by:
�� = −����(��),
where “Ln“ is the natural logarithm function.
Investigate the probability distribution of X by doing the
following:
1. Create a relative frequency histogram of X.
2. Select a probability distribution that, in your judgement, is
the best fit for X.
3. Support your assertion above by creating a probability plot
for X.
4. Support your assertion above by performing a Chi-squared
test of best fit with a 0.05
level of significance.
5. In the word document, describe your methodologies and
conclusions.
6. In the word document, explain what you have learned from
this experiment.
Hints and Theoretical Background
A popular method for generating random values according to a
certain probability
distribution is to use the inverse transform method. In this
method, the cumulative
function of the distribution (F(x)) is used for such a random
number generation. More
specifically, a standard uniform random value r is generated
first. Most software
environments are capable of generating such a value. In Excel
and R, functions
“=RAND()” and “runif()” generate such a value respectively.
After r has been created, it
then replaces F(x) in the expression of the cumulative function
and the resulting
equation is solved for the variable x.
For example, suppose we wish to generate a random value
according to the exponential
distribution with a certain mean (say μ). The cumulative
function for the exponential
distribution is:
��(��) = �� − ��−
��
��
��
(The quantity 1/μ in the above description is called the rate of
the exponential random
variable and is denoted by λ.)
Therefore, to generate a random value x that belongs to the
exponential distribution
with a mean of μ. We first generate a standard uniform value r,
then replace F(x) by r in
the above expression, and solve the resulting equation for the
variable x:
�� = �� − ��−
��
��
��
��
− ���� �� = �� − ��
− ��
��
�� = ����(�� − ��)
�� = −�� ����(�� − ��)
The formula above means that if R is a standard uniform
random variable, then the
random variable X obtained by the expression �� = −��
����(�� − ��) will belong to the
exponential distribution with an average which is equal to the
value of μ. This formula
can be simplified as:
�� = −�� ����(��)
(Note that If R is a standard uniform random variable, then (1 −
��) is also standard
uniform.)
A special case of the above formula is when �� = ��. This
means that a random variable x
generated by the formula �� = −����(��)is an exponential
random variable with an
average of 1 (or, rate=1).
Problem 2
Generate three sets of standard uniform random values, ����,
����and ����, each consisting of
10,000 values. Next, calculate the random value x according to
the following formula:
�� = −����(������������).
Investigate the probability distribution of X by doing the
following:
1. Create a relative frequency histogram of X.
2. Select a probability distribution that, in your judgement, is
the best fit for X.
3. Support your assertion above by creating a probability plot
for X.
4. Support your assertion above by performing a Chi-squared
test of best fit with a 0.05
level of significance.
5. In the word document, describe your methodologies and
conclusions.
6. In the word document, explain what you have learned from
this experiment.
Hints and Theoretical Background:
This problem is related to a theorem in the probability theory.
The theorem states that:
If ����, ����, … , ����are n identical and independent
exponential random variables each with
a mean of μ, then the random variable obtained by their sum,
that is ���� + ���� + … + ����,
will have a ����������(��, ��) probability
distribution, where n is the shape parameter of
the Gamma distribution and �� = ��
��������
.
From the Hints and Theoretical Background of Problem 1, we
know that if R is a
standard uniform random variable, then �� = −����(��) is
an exponential random variable
with an average of 1. Therefore, if ���� , ����, and
���� are three independent standard
uniform random variables, then ���� = −����(����)) ,
���� = −����(����), and ���� = −����(����)are
three independent and identical (each with a mean of 1)
exponential random variables.
Thus, according to the theorem above, the random variable
formed by their sum, that is
�−����(����)� + �−����(����)� +
(−����(����)), will belong to the ����������(��,
��)probability
distribution.
However algebraically,
�−����(����)� + �−����(����)� +
�−����(����)� = −�����(����) + ����(����) +
����(����)� = −����( ������������).
Therefore, if ���� , ����, and ���� are three
independent standard uniform random variables
between zero and 1, then the random variable X formed by the
formula �� =
−����( ������������) will belong to the
����������(��, ��) probability distribution.
Problem 3
Generate a set of 1000 pairs of standard uniform random values
����and ����. Then perform
the following algorithm for each of these 1000 pairs: Let the
output of this algorithm be
denoted by Y.
Step 1: Generate random values ���� = −����(����)
and ���� = −����(����)
Step 2: Calculate �� =
(����−��)��
��
. If ���� ≥ ��, then generate a random number ��. If �� >
��. ��
accept ����as ��(that is, let �� = ����); otherwise if
�� ≤ ��. ��, else accept −���� as �� (that is, let �� =
−����).
If ���� < ��, no result is obtained, and the algorithm
returns to step 1. This means that the
algorithm skips the pair ���� and ���� for which ���� <
�� without generating any result and
moves to the next pair ���� and����.
After repeating the above algorithm 1000 times, a number N of
the Y values will be
generated. Obviously �� ≤ ����, ������ since there will
be instances when a pair ���� and ���� would
not generate any result, and consequently that pair would be
wasted.
Investigate the probability distribution of �� by doing the
following:
1. Create a relative frequency histogram of ��.
2. Select a probability distribution that, in your judgement, is
the best fit for ��.
3. Support your assertion above by creating a probability plot
for ��.
4. Support your assertion above by performing a Chi-squared
test of best fit with a
0.05 level of significance.
5. In the word document, describe your methodologies and
conclusions.
6. In the word document, explain what you have learned from
this experiment.
Hints and Theoretical Background
Other than the inverse transform method used for generating
random values that are
according to a certain particular probability distribution, a
second applied method for
generating random values is the Rejection algorithm. The
details of this algorithm are
explained below:
Suppose we wish to generate random values x that is according
to a certain probability
distribution with ��(��)as its probability density function
(pdf). Also suppose that the
following two conditions are satisfied
(i) we are able to generate random values y that belong to a
probability distribution
whose probability density function is ��(��),
(ii) there exists a positive constant C such that ��(��)
��(��)
≤ �� for all y values (this means
that the ratio (��(��)
��(��)
) is always bounded and does not grow indefinitely. This
condition is almost always satisfied for any two probability
density functions
��(��) and ��(��)).
The rejection algorithm can now be implemented as follows:
Step 1: Generate a random value y that belongs to the
probability distribution with
��(��) as its pdf and generate a standard uniform random
value r.
Step 2: Evaluate �� = ��(��)
�� ��(��)
. If �� ≤ ��, then accept y as the random variable x (that is,
let �� =
��); otherwise return to Step1 and try another pair of (�� ,
��) values.
A few remarks about the Rejection algorithm is worth noting:
1. The probability that the generated y value will be accepted as
x, is: ��(��)
�� ��(��)
. This is the
reason why the algorithm uses a standard uniform value r and
accepts y as x if �� ≤
��
(��)
�� ��(��)
.
2. Each iteration of the algorithm will independently result in
an accepted value with a
probability equal to: ����� ≤ ��(��)
�� ��(��)
� = ��
��
. Therefore, the number of iterations needed
to generate one accepted y value follows a geometric
probability distribution with
mean C.
Relevancy of Problem 3 to the Rejection Algorithms:
In problem 3, the random variable y , selected from an
exponential probability
distribution with rate =1 and a pdf of ��(��) = ��−��, is
used to first generate the absolute
value of a standard normal random variable x (|��|has the pdf:
��(��) = ��
√����
��−
����
�� ), and
then assign positive or negative signs to this value (through a
standard uniform variable
r) in order to obtain a standard normal random value. It can be
shown algebraically that
��(��)
��(��)
= �����
��
��
− (��−��)��
�� ≤ �����
��
for all y values (note that ��
−(��−��)��
�� ≤ �� for all y values). Therefore,
the constant C in the assumptions of the algorithm can be
chosen to be: �� = �����
��
≈
��. ������. Therefore, ��(��)
�� ��(��)
= ��
− (��−��)��
�� . Hence the following algorithm can be used to generate
the absolute value of a standard normal random variable:
Step 1: Generate random variables Y and R; with Y being
exponential with ��ate=1, and R
being uniform on (��, ��)
Step 2: If �� ≤ ��
− (��−��)��
�� , then accept Y as the random variable X (that is, set �� =
��);
otherwise return to Step1 and try another pair of (�� , ��)
values.
Note that in step 2 of the above algorithm, the condition �� ≤
��
− (��−��)��
�� is mathematically
equivalent to: −����(��) ≤ (��−��)
��
��
. However, we have already seen in the Hints and
Theoretical Backgrounds of the earlier problems that if R is
standard uniform, then
−����(��) is exponential with rate=1. Therefore, the
algorithm for generating the absolute
value of the standard normal random variable can be modified
as follows:
Step 1: Generate independent exponential random variables
���� and ����; each with
��ate=1.
Step 2: Evaluate �� = (����−��)
��
��
2. If �� ≤ ����, then accept ���� as the random variable
X (that is,
set �� = ����); otherwise return to Step1 and try another
pair of (���� , ����) values.
In fact, it is the above version of the Rejection algorithm that is
being implemented in
Problem 3. However, in order to obtain a standard normal
random value (instead of its
absolute value), the step 2 of the above algorithm has been
modified as follows:
Step 2: Evaluate �� = (����−��)
��
��
. If �� ≤ ����, then generate a standard uniform variable R.
If
�� ≥ ��. ��, set �� = ����, otherwise set �� = −����.
If �� > ����, return to step 1 and try another
pair of (���� , ����) values.
Note: The standard normal random value generated by the
Rejection algorithm can be
used to generate any normal random value with a mean μ and a
standard deviation σ.
Once a standard normal variable Z has been generated, it
suffices to evaluate �� + ���� to
generate the desired normal variable.
Problem 4
In the algorithm of problem #3 above, there are instances when
the generated random
values do not satisfy the condition ���� ≥ �� In order to
obtain an acceptable value for ��. In
such cases, the algorithm returns to step 1 and generates another
two values to check for
acceptance. Let �� be the number of iterations needed to
generate �� of the accepted ��
values (�� ≥ ��). Let �� = ��
��
.
(For example, suppose that the algorithm has produced 700 ��
values (�� = ������) after 1000
iterations (�� = ��������). Then �� = ��������
������
= ��. ����. This means that it takes the algorithm
1.43 iterations to produce one output. In fact, �� itself is a
random variable. Theoretically,
��(��) - the expected value (i.e., average) of �� – of an
algorithm is a measure of efficiency
of that algorithm.)
Investigate �� by the following sequence of exploratory data
analytic methods:
1. Estimate the expected value and the standard deviation of
��.
2. Select a probability distribution that, in your judgement, is
the best fit for ��.
3. Support your assertion above by performing a Chi-squared
test of best fit with a 0.05
level of significance.
4. As the number of iterations �� becomes larger, the values
�� will approach a certain
limiting value. Investigate this limiting value of �� by
completing the following table and
plotting �� versus ��. What value do you propose for the
limiting value that ��
approaches to?
M W
10
20
30
40
50
60
70
80
90
100
200
300
400
500
600
700
800
900
1000
5. In the word document, communicate to the reader your
findings about ��.
6. In the word document, explain what you have learned from
this experiment.
Summary
In the word document, summarize and conceptualize your
findings in parts 1 – 4 above by
filling the blanks in the sentences below:
1. If �� is a standard uniform random variable, then
−����(��) has the ___________________
probability distribution.
2. The sum of three independent and identically distributed
_________________ random
variables has the ________________________ probability
distribution.
3. The output of the algorithm of problem 3 has a
______________________ probability
distribution.
4. In step 2 of the algorithm of problem 3, random variables
���� and ���� , each of whose
probability distribution is ________________________ are used
to generate a random value
�� that has the _______________________probability
distribution.
5. The random value �� that was discussed in problem 4, has
the
____________________________ probability distribution. The
expected value of �� is:
__________.
Rubric
Category Exceeds Standard Meets Standards
Approaching
Standards
Below Standards
Excel (or R):
Problem
Modeling &
Set-up
ALY6050-CO1
Completely and
concisely modeled the
problem in Excel (or
R) for each method
Accurately modeled
the problem in Excel
(or R) for each
method
Correctly modeled the
problem in Excel (or
R) for each method,
but the model lacks
detailed insight into
the problem or the
set-up is awkward.
Modeled the problem
in Excel (or R) for
each method, but
there are some gaps in
the problem modeling
and setup
Excel (or R):
Problem
Solution
&
Accuracy
ALY6050-CO1
Efficiently obtained
correct and accurate
solutions in Excel (or
R) by using the
appropriate analytic
tools of the software
Obtained complete
and accurate
solutions in Excel (or
R) by using the
appropriate analytic
tools of the software
Obtained correct
solutions in Excel (or
R) using the
appropriate analytic
tools of the software,
but the application of
the tool is awkward.
Obtained a solutions
in Excel (or R) by
using the appropriate
analytic tools of the
software, but the
solution is not
complete.
Word/Report:
Problem
Description &
Introduction
ALY6050-CO1
Provides a thorough
and concise summary
of the problem
descriptions and
introduced the
problem using rich
and significant ideas
Provides an accurate
and succinct
summary of the
problem descriptions
and problem
introduction
Provides an accurate
summary of the
problem descriptions
and problem
introduction, but the
description is too
wordy or not succinct
Provided a summary of
the problem
descriptions and
problem introduction,
but it is inaccurate or
incomplete
Word/Report:
Description of
Problem
Analysis
ALY6050-CO1
Provides a thorough
and precise
description of the
analytic concepts and
theories used in
analyzing the problem
Accurately describes
the analytic concepts
and theories used in
analyzing the problem
Describes the analytic
concepts and theories
used in analyzing the
problem, but
description lacks
appropriate detail or
precision
Describes the
analytical concepts
and theories used in
analyzing the
problem, but
descriptions are
incorrect or the
analytical concepts
and theories are
incorrect
Word/Report:
Description of
Conclusions
ALY6050-CO1
Provides conclusions
and results obtained
in the project using a
high level of critical
thinking and
reasoning
Provides relevant
conclusions and
results obtained in the
project that reflect
critical thinking and
reasoning
Provides conclusions
and results obtained
in the project, but not
all conclusions or
results are relevant to
the problem or not all
conclusions reflect
good reasoning
Provides conclusions
and results obtained
in the project, but they
are irrelevant and
reflect a lack of critical
thinking
Category Exceeds Standard Meets Standards
Approaching
Standards
Below Standards
Word/Report:
Writing
Mechanics,
Title Page, &
References
Completely free of
errors in grammar,
spelling, and
punctuation; and
completely correct
usage of title page,
citations, and
references. The report
contains a minimum
of 1000 words
There are no
noticeable errors in
grammar, spelling,
and punctuation; and
completely correct
usage of title page,
citations, and
references. The report
contains a minimum
of 1000 words
There are very few
errors in grammar,
spelling, and
punctuation; and
completely correct
usage of title page,
citations, and
references. The report
contains a minimum
of 1000 words
There are more than
five errors in
grammar, spelling,
and punctuation; or
the usage of title page,
citations, and
references are
incomplete; or the
report contains less
than 1000 words
Chi-squared Goodness of Fit Test Project  Overview and.docx

More Related Content

Similar to Chi-squared Goodness of Fit Test Project Overview and.docx

Machine learning
Machine learningMachine learning
Machine learningShreyas G S
 
Applications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersApplications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersUniversity of Salerno
 
On Application of Power Series Solution of Bessel Problems to the Problems of...
On Application of Power Series Solution of Bessel Problems to the Problems of...On Application of Power Series Solution of Bessel Problems to the Problems of...
On Application of Power Series Solution of Bessel Problems to the Problems of...BRNSS Publication Hub
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceresearchinventy
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpMaths Assignment Help
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpMaths Assignment Help
 
Get Multiple Regression Assignment Help
Get Multiple Regression Assignment Help Get Multiple Regression Assignment Help
Get Multiple Regression Assignment Help HelpWithAssignment.com
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpMath Homework Solver
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)Abhimanyu Dwivedi
 
Mathematical Statistics Assignment Help
Mathematical Statistics Assignment HelpMathematical Statistics Assignment Help
Mathematical Statistics Assignment HelpExcel Homework Help
 

Similar to Chi-squared Goodness of Fit Test Project Overview and.docx (20)

Assignment 2 solution acs
Assignment 2 solution acsAssignment 2 solution acs
Assignment 2 solution acs
 
Machine learning
Machine learningMachine learning
Machine learning
 
Correlation
CorrelationCorrelation
Correlation
 
Applications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersApplications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large Numbers
 
Talk 2
Talk 2Talk 2
Talk 2
 
On Application of Power Series Solution of Bessel Problems to the Problems of...
On Application of Power Series Solution of Bessel Problems to the Problems of...On Application of Power Series Solution of Bessel Problems to the Problems of...
On Application of Power Series Solution of Bessel Problems to the Problems of...
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Mathematical Statistics Assignment Help
Mathematical Statistics Assignment HelpMathematical Statistics Assignment Help
Mathematical Statistics Assignment Help
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
 
Class9_PCA_final.ppt
Class9_PCA_final.pptClass9_PCA_final.ppt
Class9_PCA_final.ppt
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
03_AJMS_209_19_RA.pdf
03_AJMS_209_19_RA.pdf03_AJMS_209_19_RA.pdf
03_AJMS_209_19_RA.pdf
 
03_AJMS_209_19_RA.pdf
03_AJMS_209_19_RA.pdf03_AJMS_209_19_RA.pdf
03_AJMS_209_19_RA.pdf
 
1. linear model, inference, prediction
1. linear model, inference, prediction1. linear model, inference, prediction
1. linear model, inference, prediction
 
Get Multiple Regression Assignment Help
Get Multiple Regression Assignment Help Get Multiple Regression Assignment Help
Get Multiple Regression Assignment Help
 
Euler Method
Euler MethodEuler Method
Euler Method
 
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
 
Mathematical Statistics Assignment Help
Mathematical Statistics Assignment HelpMathematical Statistics Assignment Help
Mathematical Statistics Assignment Help
 

More from bissacr

Choose 1 focal point from each subcategory of practice, educatio.docx
Choose 1 focal point from each subcategory of practice, educatio.docxChoose 1 focal point from each subcategory of practice, educatio.docx
Choose 1 focal point from each subcategory of practice, educatio.docxbissacr
 
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docx
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docxCHOICE TOPIC Pick a philosophical topic of your own choosing and re.docx
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docxbissacr
 
Choice to documentcritique 10-12 Pages APA Formation .docx
Choice to documentcritique 10-12 Pages APA Formation .docxChoice to documentcritique 10-12 Pages APA Formation .docx
Choice to documentcritique 10-12 Pages APA Formation .docxbissacr
 
Choice Hotels InternationalOverviewRead the case study, .docx
Choice Hotels InternationalOverviewRead the case study, .docxChoice Hotels InternationalOverviewRead the case study, .docx
Choice Hotels InternationalOverviewRead the case study, .docxbissacr
 
Choice Theory- Is to choose to engage in delinquent and criminal beh.docx
Choice Theory- Is to choose to engage in delinquent and criminal beh.docxChoice Theory- Is to choose to engage in delinquent and criminal beh.docx
Choice Theory- Is to choose to engage in delinquent and criminal beh.docxbissacr
 
CHM130LLLab 2Measurements Accuracy and PrecisionName __.docx
CHM130LLLab 2Measurements Accuracy and PrecisionName    __.docxCHM130LLLab 2Measurements Accuracy and PrecisionName    __.docx
CHM130LLLab 2Measurements Accuracy and PrecisionName __.docxbissacr
 
Chocolates by Jacki has provided information relating to its curre.docx
Chocolates by Jacki has provided information relating to its curre.docxChocolates by Jacki has provided information relating to its curre.docx
Chocolates by Jacki has provided information relating to its curre.docxbissacr
 
Chloe1a.  This study uses qualitative meta-synthesis to take a.docx
Chloe1a.  This study uses qualitative meta-synthesis to take a.docxChloe1a.  This study uses qualitative meta-synthesis to take a.docx
Chloe1a.  This study uses qualitative meta-synthesis to take a.docxbissacr
 
Chinese railroad workers began to contribute to the Canadian railr.docx
Chinese railroad workers began to contribute to the Canadian railr.docxChinese railroad workers began to contribute to the Canadian railr.docx
Chinese railroad workers began to contribute to the Canadian railr.docxbissacr
 
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docx
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docxCHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docx
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docxbissacr
 
Chinese Society 中国社会What are the social voices in China.docx
Chinese Society 中国社会What are the social voices in China.docxChinese Society 中国社会What are the social voices in China.docx
Chinese Society 中国社会What are the social voices in China.docxbissacr
 
China’s geography中国地理China’s physiographyRegion.docx
China’s geography中国地理China’s physiographyRegion.docxChina’s geography中国地理China’s physiographyRegion.docx
China’s geography中国地理China’s physiographyRegion.docxbissacr
 
China’s  reliance on coal epitomizes the central single energy .docx
China’s  reliance on coal epitomizes the central single energy .docxChina’s  reliance on coal epitomizes the central single energy .docx
China’s  reliance on coal epitomizes the central single energy .docxbissacr
 
chinese civilization essay question text 2-3 pages Cours.docx
chinese civilization essay question text 2-3 pages Cours.docxchinese civilization essay question text 2-3 pages Cours.docx
chinese civilization essay question text 2-3 pages Cours.docxbissacr
 
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docx
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docxChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docx
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docxbissacr
 
Chinas first emperor, Qin, unified the different territories and st.docx
Chinas first emperor, Qin, unified the different territories and st.docxChinas first emperor, Qin, unified the different territories and st.docx
Chinas first emperor, Qin, unified the different territories and st.docxbissacr
 
Chinas Great Wall Please respond to the following, using sources.docx
Chinas Great Wall Please respond to the following, using sources.docxChinas Great Wall Please respond to the following, using sources.docx
Chinas Great Wall Please respond to the following, using sources.docxbissacr
 
China1. Assess and include transcultural beliefs including l.docx
China1. Assess and include transcultural beliefs including l.docxChina1. Assess and include transcultural beliefs including l.docx
China1. Assess and include transcultural beliefs including l.docxbissacr
 
China, also known as the Peoples Republic of China or PRC, is a cou.docx
China, also known as the Peoples Republic of China or PRC, is a cou.docxChina, also known as the Peoples Republic of China or PRC, is a cou.docx
China, also known as the Peoples Republic of China or PRC, is a cou.docxbissacr
 
china & USA ----Food curlture1 follow news story, and related curr.docx
china & USA ----Food curlture1 follow news story, and related curr.docxchina & USA ----Food curlture1 follow news story, and related curr.docx
china & USA ----Food curlture1 follow news story, and related curr.docxbissacr
 

More from bissacr (20)

Choose 1 focal point from each subcategory of practice, educatio.docx
Choose 1 focal point from each subcategory of practice, educatio.docxChoose 1 focal point from each subcategory of practice, educatio.docx
Choose 1 focal point from each subcategory of practice, educatio.docx
 
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docx
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docxCHOICE TOPIC Pick a philosophical topic of your own choosing and re.docx
CHOICE TOPIC Pick a philosophical topic of your own choosing and re.docx
 
Choice to documentcritique 10-12 Pages APA Formation .docx
Choice to documentcritique 10-12 Pages APA Formation .docxChoice to documentcritique 10-12 Pages APA Formation .docx
Choice to documentcritique 10-12 Pages APA Formation .docx
 
Choice Hotels InternationalOverviewRead the case study, .docx
Choice Hotels InternationalOverviewRead the case study, .docxChoice Hotels InternationalOverviewRead the case study, .docx
Choice Hotels InternationalOverviewRead the case study, .docx
 
Choice Theory- Is to choose to engage in delinquent and criminal beh.docx
Choice Theory- Is to choose to engage in delinquent and criminal beh.docxChoice Theory- Is to choose to engage in delinquent and criminal beh.docx
Choice Theory- Is to choose to engage in delinquent and criminal beh.docx
 
CHM130LLLab 2Measurements Accuracy and PrecisionName __.docx
CHM130LLLab 2Measurements Accuracy and PrecisionName    __.docxCHM130LLLab 2Measurements Accuracy and PrecisionName    __.docx
CHM130LLLab 2Measurements Accuracy and PrecisionName __.docx
 
Chocolates by Jacki has provided information relating to its curre.docx
Chocolates by Jacki has provided information relating to its curre.docxChocolates by Jacki has provided information relating to its curre.docx
Chocolates by Jacki has provided information relating to its curre.docx
 
Chloe1a.  This study uses qualitative meta-synthesis to take a.docx
Chloe1a.  This study uses qualitative meta-synthesis to take a.docxChloe1a.  This study uses qualitative meta-synthesis to take a.docx
Chloe1a.  This study uses qualitative meta-synthesis to take a.docx
 
Chinese railroad workers began to contribute to the Canadian railr.docx
Chinese railroad workers began to contribute to the Canadian railr.docxChinese railroad workers began to contribute to the Canadian railr.docx
Chinese railroad workers began to contribute to the Canadian railr.docx
 
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docx
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docxCHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docx
CHIROPRACTIC & MANUAL THERAPIESClar et al. Chiropractic & .docx
 
Chinese Society 中国社会What are the social voices in China.docx
Chinese Society 中国社会What are the social voices in China.docxChinese Society 中国社会What are the social voices in China.docx
Chinese Society 中国社会What are the social voices in China.docx
 
China’s geography中国地理China’s physiographyRegion.docx
China’s geography中国地理China’s physiographyRegion.docxChina’s geography中国地理China’s physiographyRegion.docx
China’s geography中国地理China’s physiographyRegion.docx
 
China’s  reliance on coal epitomizes the central single energy .docx
China’s  reliance on coal epitomizes the central single energy .docxChina’s  reliance on coal epitomizes the central single energy .docx
China’s  reliance on coal epitomizes the central single energy .docx
 
chinese civilization essay question text 2-3 pages Cours.docx
chinese civilization essay question text 2-3 pages Cours.docxchinese civilization essay question text 2-3 pages Cours.docx
chinese civilization essay question text 2-3 pages Cours.docx
 
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docx
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docxChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docx
ChinaThe Third RevolutionXi Jinping and the New Chinese Sta.docx
 
Chinas first emperor, Qin, unified the different territories and st.docx
Chinas first emperor, Qin, unified the different territories and st.docxChinas first emperor, Qin, unified the different territories and st.docx
Chinas first emperor, Qin, unified the different territories and st.docx
 
Chinas Great Wall Please respond to the following, using sources.docx
Chinas Great Wall Please respond to the following, using sources.docxChinas Great Wall Please respond to the following, using sources.docx
Chinas Great Wall Please respond to the following, using sources.docx
 
China1. Assess and include transcultural beliefs including l.docx
China1. Assess and include transcultural beliefs including l.docxChina1. Assess and include transcultural beliefs including l.docx
China1. Assess and include transcultural beliefs including l.docx
 
China, also known as the Peoples Republic of China or PRC, is a cou.docx
China, also known as the Peoples Republic of China or PRC, is a cou.docxChina, also known as the Peoples Republic of China or PRC, is a cou.docx
China, also known as the Peoples Republic of China or PRC, is a cou.docx
 
china & USA ----Food curlture1 follow news story, and related curr.docx
china & USA ----Food curlture1 follow news story, and related curr.docxchina & USA ----Food curlture1 follow news story, and related curr.docx
china & USA ----Food curlture1 follow news story, and related curr.docx
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 

Chi-squared Goodness of Fit Test Project Overview and.docx

  • 1. Chi-squared Goodness of Fit Test Project Overview and Rationale This assignment is designed to provide you with hands-on experience in generating random values and performing statistical analysis on those values. Course Outcomes This assignment is directly linked to the following key learning outcomes from the course syllabus: • Use descriptive, Heuristic and prescriptive analysis to drive business strategies and actions Assignment Summary Follow the instructions in this project document to generate a number of different random values using random number generation algorithm in Excel, the Inverse Transform. Then apply the Chi-squared Goodness of Fit test to verify whether their generated values belong to a particular probability distribution. Finally, complete a report summarizing the results
  • 2. in your Excel workbook. Submit both the report and the Excel workbook. The Excel workbook contains all statistical work. The report should explain the experiments and their respective conclusions, and additional information as indicated in each problem. Be sure to include all your findings along with important statistical issues. Format & Guidelines The report should follow the following format: (i) Introduction (ii) Analysis (iii) Conclusion And be 1000 - 1200 words in length and presented in the APA format Project Instructions: The project consists of 4 problems and a summary set of questions. For each problem, tom hints and theoretical background is provided.
  • 3. Complete each section in a separate worksheet of the same workbook (Excel file). Name your Excel workbook as follows: ALY6050-Module 1 Project – Your Last Name – First Initial.xlsx In the following set of problems, r is the standard uniform random value (a continuous random value between 0 and 1). Problem 1 Generate 1000 random values r. For each r generated, calculate the random value �� by: �� = −����(��), where “Ln“ is the natural logarithm function. Investigate the probability distribution of X by doing the following: 1. Create a relative frequency histogram of X. 2. Select a probability distribution that, in your judgement, is the best fit for X. 3. Support your assertion above by creating a probability plot for X. 4. Support your assertion above by performing a Chi-squared test of best fit with a 0.05 level of significance. 5. In the word document, describe your methodologies and conclusions.
  • 4. 6. In the word document, explain what you have learned from this experiment. Hints and Theoretical Background A popular method for generating random values according to a certain probability distribution is to use the inverse transform method. In this method, the cumulative function of the distribution (F(x)) is used for such a random number generation. More specifically, a standard uniform random value r is generated first. Most software environments are capable of generating such a value. In Excel and R, functions “=RAND()” and “runif()” generate such a value respectively. After r has been created, it then replaces F(x) in the expression of the cumulative function and the resulting equation is solved for the variable x. For example, suppose we wish to generate a random value according to the exponential distribution with a certain mean (say μ). The cumulative function for the exponential distribution is: ��(��) = �� − ��− �� ��
  • 5. �� (The quantity 1/μ in the above description is called the rate of the exponential random variable and is denoted by λ.) Therefore, to generate a random value x that belongs to the exponential distribution with a mean of μ. We first generate a standard uniform value r, then replace F(x) by r in the above expression, and solve the resulting equation for the variable x: �� = �� − ��− �� �� �� �� − ���� �� = �� − �� − �� �� �� = ����(�� − ��) �� = −�� ����(�� − ��) The formula above means that if R is a standard uniform random variable, then the random variable X obtained by the expression �� = −�� ����(�� − ��) will belong to the exponential distribution with an average which is equal to the value of μ. This formula
  • 6. can be simplified as: �� = −�� ����(��) (Note that If R is a standard uniform random variable, then (1 − ��) is also standard uniform.) A special case of the above formula is when �� = ��. This means that a random variable x generated by the formula �� = −����(��)is an exponential random variable with an average of 1 (or, rate=1). Problem 2 Generate three sets of standard uniform random values, ����, ����and ����, each consisting of 10,000 values. Next, calculate the random value x according to the following formula: �� = −����(������������). Investigate the probability distribution of X by doing the following: 1. Create a relative frequency histogram of X. 2. Select a probability distribution that, in your judgement, is the best fit for X.
  • 7. 3. Support your assertion above by creating a probability plot for X. 4. Support your assertion above by performing a Chi-squared test of best fit with a 0.05 level of significance. 5. In the word document, describe your methodologies and conclusions. 6. In the word document, explain what you have learned from this experiment. Hints and Theoretical Background: This problem is related to a theorem in the probability theory. The theorem states that: If ����, ����, … , ����are n identical and independent exponential random variables each with a mean of μ, then the random variable obtained by their sum, that is ���� + ���� + … + ����, will have a ����������(��, ��) probability distribution, where n is the shape parameter of the Gamma distribution and �� = �� �������� . From the Hints and Theoretical Background of Problem 1, we know that if R is a standard uniform random variable, then �� = −����(��) is an exponential random variable with an average of 1. Therefore, if ���� , ����, and ���� are three independent standard uniform random variables, then ���� = −����(����)) ,
  • 8. ���� = −����(����), and ���� = −����(����)are three independent and identical (each with a mean of 1) exponential random variables. Thus, according to the theorem above, the random variable formed by their sum, that is �−����(����)� + �−����(����)� + (−����(����)), will belong to the ����������(��, ��)probability distribution. However algebraically, �−����(����)� + �−����(����)� + �−����(����)� = −�����(����) + ����(����) + ����(����)� = −����( ������������). Therefore, if ���� , ����, and ���� are three independent standard uniform random variables between zero and 1, then the random variable X formed by the formula �� = −����( ������������) will belong to the ����������(��, ��) probability distribution. Problem 3 Generate a set of 1000 pairs of standard uniform random values ����and ����. Then perform the following algorithm for each of these 1000 pairs: Let the output of this algorithm be denoted by Y.
  • 9. Step 1: Generate random values ���� = −����(����) and ���� = −����(����) Step 2: Calculate �� = (����−��)�� �� . If ���� ≥ ��, then generate a random number ��. If �� > ��. �� accept ����as ��(that is, let �� = ����); otherwise if �� ≤ ��. ��, else accept −���� as �� (that is, let �� = −����). If ���� < ��, no result is obtained, and the algorithm returns to step 1. This means that the algorithm skips the pair ���� and ���� for which ���� < �� without generating any result and moves to the next pair ���� and����. After repeating the above algorithm 1000 times, a number N of the Y values will be generated. Obviously �� ≤ ����, ������ since there will be instances when a pair ���� and ���� would not generate any result, and consequently that pair would be wasted. Investigate the probability distribution of �� by doing the following: 1. Create a relative frequency histogram of ��. 2. Select a probability distribution that, in your judgement, is the best fit for ��. 3. Support your assertion above by creating a probability plot
  • 10. for ��. 4. Support your assertion above by performing a Chi-squared test of best fit with a 0.05 level of significance. 5. In the word document, describe your methodologies and conclusions. 6. In the word document, explain what you have learned from this experiment. Hints and Theoretical Background Other than the inverse transform method used for generating random values that are according to a certain particular probability distribution, a second applied method for generating random values is the Rejection algorithm. The details of this algorithm are explained below: Suppose we wish to generate random values x that is according to a certain probability distribution with ��(��)as its probability density function (pdf). Also suppose that the following two conditions are satisfied (i) we are able to generate random values y that belong to a probability distribution whose probability density function is ��(��), (ii) there exists a positive constant C such that ��(��)
  • 11. ��(��) ≤ �� for all y values (this means that the ratio (��(��) ��(��) ) is always bounded and does not grow indefinitely. This condition is almost always satisfied for any two probability density functions ��(��) and ��(��)). The rejection algorithm can now be implemented as follows: Step 1: Generate a random value y that belongs to the probability distribution with ��(��) as its pdf and generate a standard uniform random value r. Step 2: Evaluate �� = ��(��) �� ��(��) . If �� ≤ ��, then accept y as the random variable x (that is, let �� = ��); otherwise return to Step1 and try another pair of (�� , ��) values. A few remarks about the Rejection algorithm is worth noting: 1. The probability that the generated y value will be accepted as x, is: ��(��) �� ��(��)
  • 12. . This is the reason why the algorithm uses a standard uniform value r and accepts y as x if �� ≤ �� (��) �� ��(��) . 2. Each iteration of the algorithm will independently result in an accepted value with a probability equal to: ����� ≤ ��(��) �� ��(��) � = �� �� . Therefore, the number of iterations needed to generate one accepted y value follows a geometric probability distribution with mean C. Relevancy of Problem 3 to the Rejection Algorithms: In problem 3, the random variable y , selected from an exponential probability distribution with rate =1 and a pdf of ��(��) = ��−��, is used to first generate the absolute value of a standard normal random variable x (|��|has the pdf: ��(��) = �� √����
  • 13. ��− ���� �� ), and then assign positive or negative signs to this value (through a standard uniform variable r) in order to obtain a standard normal random value. It can be shown algebraically that ��(��) ��(��) = ����� �� �� − (��−��)�� �� ≤ ����� �� for all y values (note that �� −(��−��)�� �� ≤ �� for all y values). Therefore, the constant C in the assumptions of the algorithm can be chosen to be: �� = ����� �� ≈ ��. ������. Therefore, ��(��)
  • 14. �� ��(��) = �� − (��−��)�� �� . Hence the following algorithm can be used to generate the absolute value of a standard normal random variable: Step 1: Generate random variables Y and R; with Y being exponential with ��ate=1, and R being uniform on (��, ��) Step 2: If �� ≤ �� − (��−��)�� �� , then accept Y as the random variable X (that is, set �� = ��); otherwise return to Step1 and try another pair of (�� , ��) values. Note that in step 2 of the above algorithm, the condition �� ≤ �� − (��−��)�� �� is mathematically equivalent to: −����(��) ≤ (��−��) �� �� . However, we have already seen in the Hints and Theoretical Backgrounds of the earlier problems that if R is standard uniform, then −����(��) is exponential with rate=1. Therefore, the
  • 15. algorithm for generating the absolute value of the standard normal random variable can be modified as follows: Step 1: Generate independent exponential random variables ���� and ����; each with ��ate=1. Step 2: Evaluate �� = (����−��) �� �� 2. If �� ≤ ����, then accept ���� as the random variable X (that is, set �� = ����); otherwise return to Step1 and try another pair of (���� , ����) values. In fact, it is the above version of the Rejection algorithm that is being implemented in Problem 3. However, in order to obtain a standard normal random value (instead of its absolute value), the step 2 of the above algorithm has been modified as follows: Step 2: Evaluate �� = (����−��) �� �� . If �� ≤ ����, then generate a standard uniform variable R. If �� ≥ ��. ��, set �� = ����, otherwise set �� = −����. If �� > ����, return to step 1 and try another pair of (���� , ����) values.
  • 16. Note: The standard normal random value generated by the Rejection algorithm can be used to generate any normal random value with a mean μ and a standard deviation σ. Once a standard normal variable Z has been generated, it suffices to evaluate �� + ���� to generate the desired normal variable. Problem 4 In the algorithm of problem #3 above, there are instances when the generated random values do not satisfy the condition ���� ≥ �� In order to obtain an acceptable value for ��. In such cases, the algorithm returns to step 1 and generates another two values to check for acceptance. Let �� be the number of iterations needed to generate �� of the accepted �� values (�� ≥ ��). Let �� = �� �� . (For example, suppose that the algorithm has produced 700 �� values (�� = ������) after 1000 iterations (�� = ��������). Then �� = ��������
  • 17. ������ = ��. ����. This means that it takes the algorithm 1.43 iterations to produce one output. In fact, �� itself is a random variable. Theoretically, ��(��) - the expected value (i.e., average) of �� – of an algorithm is a measure of efficiency of that algorithm.) Investigate �� by the following sequence of exploratory data analytic methods: 1. Estimate the expected value and the standard deviation of ��. 2. Select a probability distribution that, in your judgement, is the best fit for ��. 3. Support your assertion above by performing a Chi-squared test of best fit with a 0.05 level of significance. 4. As the number of iterations �� becomes larger, the values �� will approach a certain limiting value. Investigate this limiting value of �� by completing the following table and plotting �� versus ��. What value do you propose for the limiting value that �� approaches to? M W 10 20
  • 19. 1000 5. In the word document, communicate to the reader your findings about ��. 6. In the word document, explain what you have learned from this experiment. Summary In the word document, summarize and conceptualize your findings in parts 1 – 4 above by filling the blanks in the sentences below: 1. If �� is a standard uniform random variable, then −����(��) has the ___________________ probability distribution. 2. The sum of three independent and identically distributed _________________ random variables has the ________________________ probability distribution. 3. The output of the algorithm of problem 3 has a ______________________ probability distribution. 4. In step 2 of the algorithm of problem 3, random variables ���� and ���� , each of whose probability distribution is ________________________ are used to generate a random value �� that has the _______________________probability distribution.
  • 20. 5. The random value �� that was discussed in problem 4, has the ____________________________ probability distribution. The expected value of �� is: __________. Rubric Category Exceeds Standard Meets Standards Approaching Standards Below Standards Excel (or R): Problem Modeling & Set-up ALY6050-CO1 Completely and concisely modeled the problem in Excel (or R) for each method
  • 21. Accurately modeled the problem in Excel (or R) for each method Correctly modeled the problem in Excel (or R) for each method, but the model lacks detailed insight into the problem or the set-up is awkward. Modeled the problem in Excel (or R) for each method, but there are some gaps in the problem modeling and setup Excel (or R): Problem Solution & Accuracy ALY6050-CO1 Efficiently obtained correct and accurate
  • 22. solutions in Excel (or R) by using the appropriate analytic tools of the software Obtained complete and accurate solutions in Excel (or R) by using the appropriate analytic tools of the software Obtained correct solutions in Excel (or R) using the appropriate analytic tools of the software, but the application of the tool is awkward. Obtained a solutions in Excel (or R) by using the appropriate analytic tools of the software, but the
  • 23. solution is not complete. Word/Report: Problem Description & Introduction ALY6050-CO1 Provides a thorough and concise summary of the problem descriptions and introduced the problem using rich and significant ideas Provides an accurate and succinct summary of the problem descriptions and problem introduction Provides an accurate
  • 24. summary of the problem descriptions and problem introduction, but the description is too wordy or not succinct Provided a summary of the problem descriptions and problem introduction, but it is inaccurate or incomplete Word/Report: Description of Problem Analysis ALY6050-CO1 Provides a thorough and precise description of the analytic concepts and theories used in
  • 25. analyzing the problem Accurately describes the analytic concepts and theories used in analyzing the problem Describes the analytic concepts and theories used in analyzing the problem, but description lacks appropriate detail or precision Describes the analytical concepts and theories used in analyzing the problem, but descriptions are incorrect or the analytical concepts and theories are incorrect
  • 26. Word/Report: Description of Conclusions ALY6050-CO1 Provides conclusions and results obtained in the project using a high level of critical thinking and reasoning Provides relevant conclusions and results obtained in the project that reflect critical thinking and reasoning Provides conclusions and results obtained in the project, but not all conclusions or results are relevant to
  • 27. the problem or not all conclusions reflect good reasoning Provides conclusions and results obtained in the project, but they are irrelevant and reflect a lack of critical thinking Category Exceeds Standard Meets Standards Approaching Standards Below Standards Word/Report: Writing Mechanics, Title Page, & References
  • 28. Completely free of errors in grammar, spelling, and punctuation; and completely correct usage of title page, citations, and references. The report contains a minimum of 1000 words There are no noticeable errors in grammar, spelling, and punctuation; and completely correct usage of title page, citations, and references. The report contains a minimum of 1000 words There are very few errors in grammar,
  • 29. spelling, and punctuation; and completely correct usage of title page, citations, and references. The report contains a minimum of 1000 words There are more than five errors in grammar, spelling, and punctuation; or the usage of title page, citations, and references are incomplete; or the report contains less than 1000 words