Chapter 1 Quiz -1-6 Quiz_ Python Functions and Probability

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

243

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

4

Uploaded by EarlSteel9150

Report
Question 1 3/ 3 points Which of the following Python lines returns subset data for only the variable “age” from a dataframe called “titanic"? Select one. o) titanic['age'] ['age']titanic titanic('age') titanic_read_variables['age'] Question 2 3/ 3 points What is the correct range for probability values? Select one. Between -10 and 10 Between -1 and 1 o) Between O and 1 Between -1 and 0 Question 3 3/ 3 points Which of the following Python lines returns subset data for only the variables “survived” and “age” from a dataframe called “titanic"? Select one. titanic('survived'age’) titanic_read_variables[['survived'age']] [['survived''age']]titanic o titanic[['survived'age']]
Question 4 0/ 3 points Which of the following Python scripts calculates the mean of two variables, “Exam1” and “Exam2”, from a CSV file called “ExamScores”? import pandas as pd scores = pd.read_csv('ExamScores.csv') print(mean[['Exam1, 'Exam2']]) import pandas as pd scores = pd.read_csv('ExamScores.csv') print(scores[['Exam1’, 'Exam2']].mean()) import pandas as pd scores = pd.read_csv('ExamScores.csv') print(scores(['Exam1', 'Exam2']].median()) o import pandas as pd scores = pd.read_csv('ExamScores.csv') print(scores{'Exam1’, 'Exam2'}..mean()) Question 5 3/ 3 points A and B are mutually exclusive events. If P(A)=0.07692 and P(B)=0.25, what is the probability P(AUB) four decimal places? Select one. e)0.3269 0.1731 0.2500 0.0769
Question 1 3/ 3 points If Aand B are independent events and P(A)=0.25 and P(B)=0.333, what is the probability PIA0B)? Select one. ©)0.08325 1.33200 -0.0830 0.75075 Question 2 3/ 3 points Which Python module is used to create graphs? Select one. numpy or math pandas or numpy pandas or time ) matplotlib or seaborn Question 3 3/ 3 points If P(A)=0.07692, P(B)=0.25, and P(A0B) =0,01923, what is PAUB) to four decimal places? Select one. # 03077 0.3269 0.2516 0.3462
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 4 0/ 3 points Which of the following Python lines will import data from a CSV file called “unemployment” into a Python dataframe called “unemployment”? Select all that apply. import pandas unemployment = pandas.read_csv(‘'unemployment.csv') import numpy unemployment = numpy.read_csv(‘unemployment.csv') | import pandas as pd unemployment = pd.read_csv('unemployment.csv') Question 5 3/ 3 points A and B are mutually exclusive events. If P(A)=0.07692 and P(B)=0.25, what is the probability P(AUB) four decimal places? Select one. 0.1731 0.2500 0.0769 ) 0.3269