Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 The objective of this question is to give practice with writing a function with several arguments and creating local objects. (a) Write

image text in transcribed

Question 5 The objective of this question is to give practice with writing a function with several arguments and creating local objects. (a) Write a function called z_prop () which calculates the z-statistic given the following values/arguments: x: the number of successes n: the number of trials p0: the hypothesized population proportion Hint: As a reminder, the z-statistic is given by the formula -Po Po (1-Po) n where p denotes the sample proportion. How is p related to the input arguments? (b) Suppose that 60% of residents in the city of Pawnee, Indiana, prefer waffles over pancakes. Out of a sample of 13 Pawnee residents, 10 of them prefer waffles. Use your z_prop() function from (a) to calculate the z-statistic for this sample. Hint: The input argument p0 is a proportion, not a percentage. (c) Interpret the value of the z-statistic from (b) in the context of the data. Hint: This is a Stats 10/12/13 question. (d) For the same population of Pawnee residents, another sample is observed. Out of a sample of 39 Pawnee residents, 30 of them prefer waffles. Use your z_prop() function from (a) to calculate the z-statistic for this ala

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

General Chemistry

Authors: John McMurry, Robert Fay

2nd Edition

321809262, 978-0321809261

More Books

Students also viewed these Mathematics questions