Question

Below is what I am working. The first two screen caps are from Codio a program we use online at my school. I have been running my code through Python 3 to make sure it works before submitting my assignments; usually I have little to no issues. But now I am stuck on this one problem. Please help.

Step 4: Construct confidence interval for population proportion Construct a 99% confidence interval for the proportion of mon

##Step 4: Construct confidence interval for population proportion print (Confidence Interval - Step 4) n (production) [L C

Python 3 Trinkets The easiest way to use the full power of Python 3. 四Remix +Powered by Otrinket く> main.py inflammation-01.c

Step 4: Construct confidence interval for population proportion Construct a 99% confidence interval for the proportion of months with rice production above 307200 cwt (Company1>307200.0). In order to perform this function, you need to make the appropriate modifications to the provided script. In other words, you should Comment lines 17-52 Comment lines 56 - 89 Uncomment lines 94-100 Replace ???DATASET_NAME??? with production Replace 277VARIABLE_NAME???' with the variable 'Company1' Replace ??2Xvalue??? with the appropriate value
##Step 4: Construct confidence interval for population proportion print ('Confidence Interval - Step 4') n (production) [L' Companyl']] .count() x = (production) [['Company 1 ' ]] > 36729θ ·values.sun() stderror - (p . (1 - p)/n)*e.:s print (st.norm.interval (0.99, p, stderror)) print )
Python 3 Trinkets The easiest way to use the full power of Python 3. 四Remix +Powered by Otrinket く> main.py inflammation-01.csv File "/tmp/sessions/ac364fc4c9be04ce 1 print ('Confidence Interval -Step 4) 2 n. (production[["Company!נני .count() 3 x (production['Company1']]>387200.values.sum() /main.ру", line 3 x(production[I'Company1'11>307200 5 stderror-(p(1 p)/n)0.5 6 print (st.norm.interval (.99, p, stderror)) print .values.sum() SyntaxError: invalid syntax
0 0
Add a comment Improve this question Transcribed image text
Answer #1

actually you forget close the PARENTHESIS

of 2nd and 3rd line x and n values.

you are open the PARENTHESIS but you didn't close the PARENTHESIS.

so that's why you get syntax error.and you must open the files based on the column names

you able to do operations.

code:

File Edit Search View Encoding Language Settings Tools Macro Run Plugins Window? bel.py dish py ord py k py namana.csv import

#in plain text format

import pandas as pd
from scipy import stats
print("Confidence Interval-step 4")
production=pd.read_csv("filename.csv")
n=(production["company1"].count())
x=(production[production['company1']>307200]['company1'].sum())
p=x/n*1.0
stderror=(p*(1-p)/n)**0.5
print(stats.norm.interval(0.99,p,stderror))
print(' ')


#if you have any doubts comment below..

Add a comment
Know the answer?
Add Answer to:
Below is what I am working. The first two screen caps are from Codio a program we use online at my school. I have been r...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please see the questions below from the attached picture. It has been claimed from previous studies...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT