0% found this document useful (0 votes)
443 views

Stat 2

This document provides instructions for a statistical inference case study. It explains that students will be given questions to answer using their statistical knowledge. Answers should be assigned to variables and rounded to two decimal places. Once completed, running all cells will display incorrect answers and provide an overall score. The document then presents 9 multiple part questions covering topics like probability, distributions, percentiles, and variance. Students are to assign their answers to variables to be automatically evaluated.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
443 views

Stat 2

This document provides instructions for a statistical inference case study. It explains that students will be given questions to answer using their statistical knowledge. Answers should be assigned to variables and rounded to two decimal places. Once completed, running all cells will display incorrect answers and provide an overall score. The document then presents 9 multiple part questions covering topics like probability, distributions, percentiles, and variance. Students are to assign their answers to variables to be automatically evaluated.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

### Welcome to Statistical inference case study.

- In this case study you are given a set of questions which needs to be answered
using your knowledge on statistics.
- For each question assign your answers to respective variables in the following
cells.
- Create a new notebook (will not be graded to try out your scripts ans assign the
- All the answers are expected to be rounded off to two decimal places.
- Once you assign your answers to variables in each cell run the cell to display
incorrect answers if any.
- Dont leave any variables unassigned.
- Dont edit the script ment for evaluation
- Once you are done with your solutions run all the cells (kernel -> Restart & run
all).

import numpy as np
import math
import scipy.stats

import dill

Quiz = dill.load(open("QuizClass.pik", 'rb'))


quiz = dill.load(open('Quiz.pik', 'rb'))

1. Suppose a variable X has a bell-shaped distribution with a mean of 150 and a


standard deviation of 20.
a. What percentage of X values lies between 130 and 170?
b. What percentage of X values lies between 110 and 190?
c. What percentage of X values lies above 190?

### Assign your answers here


a_1 =68.26
b_1 =95
c_1 =2.28

### For evalution


ans_1 = {"a_1":math.floor(a_1), "b_1": b_1, "c_1" : c_1}
quiz.eval(1, ans_1)

2. Variable X has a mean of 15 and a standard deviation of 2.


a. What percentage of X values will lie within 1.5 standard deviation of the
mean?
b. What is the minimum percentage of X values that lie between 8 and 17?

### Assign your answers here


a_2 = 86.64
b_2 = 84.11

### For evalution


ans_2 = {"a_2":a_2, "b_2": b_2}
quiz.eval(2, ans_2)

3. What is the 25 percentile of the below samples


[3.09, 2.48, 2.02, 2.98, 3.53, 2.41, 2.01, 2.95, 2.63, 3.09, 3.26,
2.04, 3.74, 2.99, 2.34, 2.77, 3.05, 3.29, 3.14, 3.17]

### Assign your answers here


X = [3.09, 2.48, 2.02, 2.98, 3.53, 2.41, 2.01, 2.95, 2.63, 3.09, 3.26, 2.04, 3.74,
2.99, 2.34, 2.77, 3.05, 3.29, 3.14, 3.17]

a_3 = round(np.percentile(X,25),2)

###For evaluation
ans_3 = {"a_3": a_3}
print(ans_3)
quiz.eval(3, ans_3)

4. Suppose a marble is randomly selected from a jar containing 12 red, 4 black, and
8 blue marbles. Find the probability of the following:
a. The marble is red or black
b. The marble is black or blue
c. The marble is not blue
d. The marble is red or not blue

### Assign your answers here


a_4 = 0.67
b_4 = 0.5
c_4 = 0.67
d_4 = 0.67

### For evalution


ans_4 = {"a_4":a_4, "b_4": b_4, "c_4" : c_4, "d_4": d_4}
quiz.eval(4, ans_4)

5. Let A and B be events with P(A) = 0.2, P(B) = 0.8, and P(A ∩ B) = 0.1 Find the
following
a. $P(\bar B)$
b. $P(\bar A \cap \bar B)$
c. $P(\bar B \space | \space A)$
d. $P(\bar A \cap B)$

### Assign your answers here


a_5 = 0.2
b_5 = 0.1
c_5 = 0.5
d_5 = 0.7

### For evalution


ans_5 = {"a_5":a_5, "b_5": b_5, "c_5" : c_5, "d_5": d_5}

quiz.eval(5, ans_5)

6. Given a sample of size n = 60 taken from a continuous population distribution


with mean 56 and standard deviation 25, find the variance of the sample mean.

### Assign your answers here


variance = 10.42

### For evalution


ans_6 = {"variance": variance}
quiz.eval(6, ans_6)

7. 55% of all engineering students prefer internship over final year project.
Suppose 12 students are randomly selected and the number in favor of internship is
recorded. Find the following:
a. The probability that exactly seven of them choose internship.
b. The probability that at most eight of them choose internship.
c. The probability that at least five of them choose internship.
d. The probability that at least seven, but no more than 10, choose internship.

### Assign your answers here


a_7 = 0.22
b_7 = 0.87
c_7 = 0.89
d_7 = 0.52

### For evalution


ans_7 = {"a_7":a_7, "b_7": b_7, "c_7" : c_7, "d_7": d_7}

quiz.eval(7, ans_7)

8. Suppose the population variable X is N(3, 0.3) and n = 20. How large an interval
must be chosen so that the probability is 0.95 that the sample mean $\bar X$ lies
within ±a units of the population mean μ?

### Assign your answers here


interval =0.6

### For evalution


ans_8 = {"interval":np.around(interval, 1)}
quiz.eval(8, ans_8)

9. A random variable X is N(25, 4). Find the indicated percentile for X:


a. The 10th percentile
b. The 90th percentile
c. The 80th percentile
d. The 50th percentile

### Assign your answers here


# X=np.random.normal(25,4,10000)
a_9 = round((25-4*1.28),2)
b_9 = round((25+4*1.28),2)
c_9 = round((25+4*0.84),2)
d_9 = 25

### For evalution


ans_9 = {"a_9":a_9, "b_9": b_9, "c_9" : c_9, "d_9": d_9}
quiz.eval(9, ans_9)

### Run the below cell to save your answers for final evaluation

with open('Quiz.pik', 'wb') as file:


dill.dump(quiz, file)
quiz = dill.load(open('Quiz.pik', 'rb'))
quiz.score()

You might also like