Answered step by step
Verified Expert Solution
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 stepbystep 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 : Generating population data
This block of Python code will generate unique TPCP population data of size 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 :
import pandas as pd import matplotlib.pyplot as plt
import numpy as np import scipy.stats as st
# use gamma distribution to randomly generate observations
shape, scale tpcp nprandom.gammashape scale,
# pandas library can be used to convert the array into a dataframe of rounded figures with the column name TPCP
tpcpdf pd DataFrametpcp columns TPCP
round
# print the dataframe to see the first and last observations note that the index of dataframe starts at
printTPCP data frame
In the Python script, you created a histogram for the dataset
generated in Step Check to make sure that this data
distribution is skewed and included in your attachment. See
Step in the Python script.
What is the mean of the TPCP population data? See Step in
the Python script.
In the Python script, you selected a random sample with
replacement, of size 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 in the Python script.
You also selected random samples of size 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 in the Python script.
Review the plotted data distribution for these means.
Does this approximate a Normal distribution? Does this
confirm the first part of the central limit theorem? Why or why
not? See Step in the Python script.
What is the "grand" mean and standard deviation of these
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 in the Python script.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started