You can use python packages for solving a theory part. Theory (60 points) 1. Joon takes a 40-question exam, but did not study so choose the answer randomly. Each question has two possible choices for...

1 answer below »
Please see instructions in attachments


You can use python packages for solving a theory part. Theory (60 points) 1. Joon takes a 40-question exam, but did not study so choose the answer randomly. Each question has two possible choices for the answer (True of False). Find the probability that the Joon guesses more than 30 questions correctly (# of correct answer > 30). (Please use Binomial distribution) (20 points) 2. The average number of pets our students have their lifetime is 1.47. Suppose that one student is randomly chosen (Let’s define a random variable X as the number of pets for our students) (please use Poisson distribution) (20 points) a. Find the probability that the student has no pet. b. Find the probability that the student has fewer pet than the average. c. Find the probability that the student has more pets than the average. 3. Suppose that the useful life of a particular car battery, measured in months, decays with parameter 0.025 (Exponential distribution). We are interested in the life of the battery. Let’s define a random variable X as the life time of battery). (20 points) a. On average, how long would you expect one car battery to last? b. Find the probability that a car battery lasts less than 36 months. Practice (40 points) 1. The bank wants to check who has a personal loan. They collect data and assume that three factors (age, income, education) are related to the personal loan. Please help them using hypothesis testing. (40 points) a. Find “Bank.csv” and load it using pandas. b. Splitting it into two groups (PersonalLoan=0 and 1). (10 points) c. Please do three hypothesis tests (t-test) using “ttest_ind” for (1) Age, (2) Income, and (3) Education. Show your results for 95% confidence level (p=0.05). (Note: your Null hypothesis (H0) is that the population mean of the two groups is the same (no difference)). (30 points)
Answered Same DaySep 22, 2021

Answer To: You can use python packages for solving a theory part. Theory (60 points) 1. Joon takes a...

Abhishek answered on Sep 23 2021
152 Votes
{
"cells": [
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"fro
m scipy import stats\n",
"from scipy.stats import sem, t\n",
"from numpy import mean"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" bank-got2icve.csv 't test.ipynb'\r\n"
]
}
],
"source": [
"ls"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [],
"source": [
"df=pd.read_csv('bank-got2icve.csv', index_col=[0])"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Age', 'Income', 'Education', 'PersonalLoan'], dtype='object')"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.columns"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"df_0=df.loc[df['PersonalLoan']==0]\n",
"df_1=df.loc[df['PersonalLoan']==1]"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Ttest_indResult(statistic=0.5461906615539323, pvalue=0.584959263705325)"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here