Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In your initial post, address the following items: Module Two Discussion: The Central Limit Theorem This notebook contains the step - by - step directions

In your initial post, address the following items: Module Two Discussion: The Central Limit Theorem
This notebook contains the step-by-step directions for your Module Two discussion. It is very important to run through the steps in order. Some steps depend
on the outputs of earlier steps. Once you have completed the steps in this notebook, be sure to answer the questions about this activity in the Discussion for
on the outpul this modul.
Reminder: If you have not already reviewed the discussion prompt, please do so before beginning this activity. That will give you an idea of the questions you
will need to answer with the outputs of this script.
Initial post (due Thursday)
Step 1: Generating population data
This block of Python code will generate unique TPCP population data of size 500 observations. You will use this data set in this week's discussion. The numpy
module in Python can be used to create datasets with a skewed distribution by randomly generating data from a gamma distribution. You do not need to know
what a gamma distribution is or how a dataset is drawn from it. The dataset will be saved in a Python dataframe that you will use in later calculations.
Click the block of code below and hit the Run button above.
In [1]:
import pandas as pd import matplotlib.pyplot as plt
import numpy as np import scipy.stats as st
# use gamma distribution to randomly generate 500 observations
shape, scale =1.95,2.5 tpcp =100* np.random.gamma(shape, scale, 500)
# pandas library can be used to convert the array into a dataframe of rounded figures with the column name TPCP.
tpcp_df = pd. DataFrame(tpcp, columns 'TPCP'])
round(0)
# print the dataframe to see the first 5 and last 5 observations (note that the index of dataframe starts at 0).
print("TPCP data frame "
In the Python script, you created a histogram for the dataset
generated in Step 1. Check to make sure that this data
distribution is skewed and included in your attachment. See
Step 2 in the Python script.
What is the mean of the TPCP population data? See Step 3 in
the Python script.
In the Python script, you selected a random sample with
replacement, of size 50(note that this is a sufficiently large
sample), from the TPCP population. What is the mean of your
random sample? Does this sample mean closely approximate
the TPCP population mean? See Step 4 in the Python script.
You also selected 1,000 random samples of size 50 and
calculated the mean of each sample. Then you stored those
means into a dataframe. Check to make sure the output of this
step is in your attachment. See Step 5 in the Python script.
Review the plotted data distribution for these 1,000 means.
Does this approximate a Normal distribution? Does this
confirm the first part of the central limit theorem? Why or why
not? See Step 6 in the Python script.
What is the "grand" mean and standard deviation of these
1,000 means? Does the grand mean closely approximate (on a
relative basis) the mean of the original distribution? Does this
confirm the second part of the central limit theorem? Why or
why not? See Step 7 in the Python script.
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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago