Use the link in the Jupyter Notebook activity to access your Python script. Once you have made your calculations, complete this discussion. The script will output answers to the questions given below. You must attach your Python script output as an HTML file and respond to the questions below.
In this discussion, you will apply the statistical concepts and techniques covered in this week's reading about hypothesis testing for the difference between two population proportions. In the previous week’s discussion, you studied a manufacturing process at a factory that produces ball bearings for automotive manufacturers. The factory wanted to estimate the average diameter of a particular type of ball bearing to ensure that it was being manufactured to the factory’s specifications.
Recently, the factory began a new production line that is more efficient than the existing production line. However, the factory still needs ball bearings to meet the same specifications. To compare the accuracy of the new process against the existing process, the factory decides to take two random samples of ball bearings. The first sample is of 50 randomly selected ball bearings from the existing production line, and the second sample is of 50 randomly selected ball bearings produced from the new production line. For each sample, the diameters of the ball bearings were measured.
The two samples will be generated using Python’s numpy module. These data sets will be unique to you, and therefore your answers will be unique as well. Run Step 1 in the Python script to generate your unique sample data.
Suppose that the factory claims that the proportion of ball bearings with diameter values less than 2.20 cm in the existing manufacturing process is the same as the proportion in the new process. At alpha=0.05, is there enough evidence that the two proportions are the same? Perform a hypothesis test for the difference between two population proportions to test this claim.
![Click the block of code below and hit the Run button above. In [1]: import pandas as pd import numpy as np # create 50 random](http://img.homeworklib.com/questions/dbfd74c0-b010-11eb-b65a-ef5b095ee1c6.png?x-oss-process=image/resize,w_560)

As you have executed the code cell. It throws tou an error about diameters_sample1_df is not defined.
You may be able to see that
['diameters']<2.20
its showing in blue color thats because python is unable to identify that blue text. This is because you are reffering to that column in wrong way.
The code which you have written is
count1 = len(diameters_sample1_df[diameters_sample1_df['diameters']<2.20])
This code looks perfectly fine.
And also you should not apply the len function here. Try doing like this:
count1 = diameters_sample1_df['diameters']<2.20] count1 = len(count1)
These all are different ways you can rectify your error. But still you should give a try this code to run in sequence mean first initialization/declaration/creation and then use it.
Try using small abbrevation variable names.
And most important thing, execute a code in each different cell. It will help you debug you errors. So that will be easy to detect where your error lies.
I recommend you to execute codes in one cell each. Don't just write all your code in one single cell.
Use the link in the Jupyter Notebook activity to access your Python script. Once you have...
Please see the questions below from the attached picture.
It has been claimed from previous studies that the average
diameter of ball bearings from this manufacturing process is 2.30
cm. Based on the sample of 50 that you collected, is there evidence
to suggest that the average diameter is greater than 2.30 cm?
Perform a hypothesis test for the population mean at alpha =
0.01.
Please answer the below:
Define the null and alternative hypothesis for this test in
mathematical...
Python with Pandas dataframe
I have a csv file that contains a large number of columns and
rows. I need to write a script that concatenates some elements of
the first row with some elements of the 2 row. Something like # if
data[1][0] starts with ch then concatenate the element right below
it. I have attached a picture of just a sample of my data. The
booleans have to stay on there as is. But I must drop the...
NOTE: USE PYTHON CS160 Computer Science Lab 14 Working with lists, functions, and files Objective: Work with lists Work with lists in functions Work with files Assignment: Part 1: Write a program to create a text file which contains a sequence of test scores. Ask for scores until the user enters an empty value. This will require you to have the scores until the user enters -1. After the scores have been entered, ask the user to enter a file...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
23.4 Project 4: Using Pandas for data analysis and practice with
error handling
Python Please!
23.4 PROJECT 4: Using Pandas for data analysis and practice with error handling Overview In this project, you will use the Pandas module to analyze some data about some 20th century car models, country of origin, miles per gallon, model year, etc. Provided Input Files An input file with nearly 200 rows of data about automobiles. The input file has the following format (the same...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
In this lab you will convert lab5.py to use object oriented
programming techniques. The createList and checkList functions in
lab5.py become methods of the MagicList class, and the main
function of lab6.py calls methods of the MagicList class to let the
user play the guessing game.
A. (4pts) Use IDLE to create a lab6.py. Change the 2 comment
lines at the top of lab6.py file:
First line: your full name
Second line: a short description of what the program...
Python coding exercise: please include comments Goal #1: import financial data given into your program provided to you as a CSV formatted text file Use the following data for testing (the following is only a sample of the data; there are over 4000 rows of data): *Note: The data you will read in is linear by date (but, non-contiguous due to holidays and weekends,) reflecting a timeline of stock performance in chronological order; however your program should run through the...
Python coding exercise: please include comments Goal #1: import financial data given into your program provided to you as a CSV formatted text file Use the following data for testing (the following is only a sample of the data; there are over 4000 rows of data): *Note: The data you will read in is linear by date (but, non-contiguous due to holidays and weekends,) reflecting a timeline of stock performance in chronological order; however your program should run through the...