0% found this document useful (0 votes)
146 views12 pages

Inferential Statistics (AutoRecovered)

Uploaded by

Shariq Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views12 pages

Inferential Statistics (AutoRecovered)

Uploaded by

Shariq Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Inferential Statistics

Instructions:

Please share your answers filled inline in the word document. Submit code files wherever
applicable.
Insights should be drawn from the plots about the data such as, is data normally
distributed/not, outliers, measures like mean, median, mode, variance, std. deviation, etc.

Please ensure you update all the details:

Name: Tariz Atique

Batch Id: Data Science_11052022


Topic: Basic Statistics

Problem Statements:
Q1) Three Coins are tossed, find the probability that two heads and one tail are obtained?

Ans1) When three coins are tossed the total number of possible combinations
are 23 = 8.

These combinations are HHH, HHT, HTH, THH, TTH, THT, HTT, TTT.
The number of combinations which have two heads and one tail are:
HHT, HTH, TTH which makes them 3 in number.
Therefore the Probability of getting two heads and one tails in the toss of three
coins simultaneously is defined as:
P(Two heads and One Tail) = Number of outcomes
= 3/8 = 0.375

Q2) Two Dice are rolled, find the probability that sum is

© 2013 - 2021 360DigiTMG. All Rights Reserved.


a) Equal to 1
Ans) Zero because its starts with (1,1)
b) Less than or equal to 4
Ans) Total Number of outcomes = 36

Sum less than or equal to 4 =

(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)

(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)

(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)

(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)

(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)

(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)

Number of favourable outcomes = 6


Probability = 6/36 = 1/6
c) Sum is divisible by 2 and 3
Ans) Total Number of outcomes = 36

Sum is divisible by 2 and 3 =

(1,1)(1,2)(1,3)(1,4)(1,5)(1,6)

(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)

(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)

(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)

(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)

(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)

Number of Favourable Outcomes = 24

Probability = 24/36 = 2/3

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Q3) A bag contains 2 red, 3 green and 2 blue balls. Two balls are drawn at random. What is the
probability that none of the balls drawn is blue?
Ans) There are 7 balls originally with 2 of them blue so the probability of the first ball not being blue
is 5/7. This leaves 6 balls with 2 blue. The probability of the second ball not being blue assuming that
the first wasn’t is 4/6. The probability that neither ball drawn was blue is (5/7)*(4/6)=20/42=10/21

Q4) Calculate the Expected number of candies for a randomly selected child:
Below are the probabilities of count of candies for children (ignoring the nature of the child-
Generalized view)
i. Child A – probability of having 1 candy is 0.015
ii. Child B – probability of having 4 candies is 0.2
Ans) 3.09
CHILD Candies count Probability
A 1 0.015
B 4 0.20
C 3 0.65
D 5 0.005
E 6 0.01
F 2 0.12

Q5) Calculate Mean, Median, Mode, Variance, Standard Deviation, Range & comment about
the values / draw inferences, for the given dataset
- For Points, Score, Weigh>
Find Mean, Median, Mode, Variance, Standard Deviation, and Range and comment about the
values/ Draw some inferences.

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Dataset: Refer to Hands-on Material in LMS - Data Types EDA assignment snap shot of dataset
is given above.
Ans)

Points Score Weigh


Mean 3.596563 3.211562 17.848750
Median 3.695 3.325 17.710
Mode 3.07 3.44 17.02
variance 0.285881 0.932503 3.193166
Standard deviation 0.534679 0.965662 1.786943
Range 2.17 3.832 8.3999..

Points Boxplot. There are no outliers

Data is skewed positively.

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Score Boxplot as You there are outliers in this data.

Data distributed on Negative direction.

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Weigh boxplot as you can see outliers are present.

Data distributed Normally.

Q6) Calculate Expected Value for the problem below


a) The weights (X) of patients at a clinic (in pounds), are
108, 110, 123, 134, 135, 145, 167, 187, 199
Assume one of the patients is chosen at random. What is the Expected Value of the
Weight of that patient?

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Ans) Expected Value  =  ∑ ( probability  * Value )

 ∑ P(x).E(x)

there are 9 patients

Probability of selecting each patient = 1/9

Ex  108, 110, 123, 134, 135, 145, 167, 187, 199

P(x)  1/9  1/9   1/9  1/9   1/9   1/9   1/9   1/9  1/9

Expected Value  =  (1/9)(108) + (1/9)110  + (1/9)123 + (1/9)134 + (1/9)135 + (1/9)145 + (1/9(167) +


(1/9)187 + (1/9)199

= (1/9) ( 108 + 110 + 123 + 134 + 135 + 145 + 167 + 187 + 199)

= (1/9)  (  1308)

= 145.33

The expected value of the weight of the patient = 145.33

Q7) Look at the data given below. Plot the data, find the outliers and find out μ , σ , σ 2
Hint: [Use a plot which shows the data distribution, skewness along with the outliers; also use
R/Python code to evaluate measures of centrality and spread]

Name of company Measure X


Allied Signal 24.23%
Bankers Trust 25.53%
General Mills 25.41%
ITT Industries 24.14%
J.P.Morgan & Co. 29.62%
Lehman Brothers 28.25%
Marriott 25.81%
MCI 24.39%
Merrill Lynch 40.26%
Microsoft 32.95%
Morgan Stanley 91.36%
Sun Microsystems 25.99%
Travelers 39.42%
US Airways 26.71%

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Warner-Lambert 35.00%

Ans) mean = μ = sum of Terms/Number Of Terms

Μ = 0.332713
σ = Standard deviation = 0.169454

σ 2 = Variance = 0.028715
Python Code:
import pandas as pd
import matplotlib.pyplot as plt
inf = pd.read_excel("E:/Data Science/assignment/DataSets/stats1.xlsx")
inf.mean()
inf.std()
inf.var()
plt.boxplot(inf.Measure)
plt.hist(inf.Measure)
Outliers are present.

Data skewed on right side means data is positively skewed.

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Q8) AT&T was running commercials in 1990 aimed at luring back customers who had switched
to one of the other long-distance phone service providers. One such commercial shows a
businessman trying to reach Phoenix and mistakenly getting Fiji, where a half-naked native on a
beach responds incomprehensibly in Polynesian. When asked about this advertisement, AT&T
admitted that the portrayed incident did not actually take place but added that this was an
enactment of something that “could happen.” Suppose that one in 200 long-distance telephone
calls is misdirected.

What is the probability that at least one in five attempted telephone calls reaches the wrong
number? (Assume independence of attempts.)
Hint: [Using Probability formula evaluate the probability of one call being wrong out of five
attempted calls]

Ans) one in 200 long-distance telephone calls is misdirected

=>  probability of call misdirecting  p = 1/200

     Probability of call not Misdirecting = 1 - 1/200 = 199/200

Number of Calls = 5

P(x) = ⁿCₓpˣqⁿ⁻ˣ

n=5

p = 1/200

q = 199/200

at least one in five attempted telephone calls reaches the wrong number

© 2013 - 2021 360DigiTMG. All Rights Reserved.


= 1  -  none of the call reaches the wrong number

= 1  - P(0)

= 1   -  ⁵C₀(1/200)⁰(199/200)⁵⁻⁰

= 1  -  (199/200)⁵

= 0.02475

probability that at least one in five attempted telephone calls reaches the wrong number =
0.02475

Q9) Returns on a certain business venture, to the nearest $1,000, are known to follow the
following probability distribution
X P(x)
-2,000 0.1
-1,000 0.1
0 0.2
1000 0.2
2000 0.3
3000 0.1

(i) What is the most likely monetary outcome of the business venture?
Hint: [The outcome is most likely the expected returns of the venture]

Ans(i) most likely monetary outcome of the business venture  is 2000  $

as it has maximum probability = 0.3

(ii) Is the venture likely to be successful? Explain.


Hint: [Probability of % of venture being a successful one]

Ans(ii) Expected value =  ∑E(X)P(X)  = 800

long-term average earning of business ventures  = 800 $


venture is  likely to be successful as Expected value is + ve   = 800 $

© 2013 - 2021 360DigiTMG. All Rights Reserved.


(iii) What is the long-term average earning of business ventures of this kind? Explain.
Hint: [Here, the expected returns to the venture is considered as the
the required average]
Ans(iii) weighted average = x*P(x) = 800. This means the average expected earnings over a
long period of time would be 800(including all losses and gains over the period of time)

(iv) What is the good measure of the risk involved in a venture of this kind? Compute
this measure.
Hint: [Risk here stems from the possible variability in the expected returns,
therefore, name the risk measure for this venture]

ANS: P(loss) = P(x= -2000)+P(x=-1000)=0.2. So the risk associated with this venture is 20%

Hints:
For each assignment, the solution should be submitted in the below format
1. Research and Perform all possible steps for obtaining solution.
2. For Statistics calculations, explanation of the solutions should be documented detail along
with codes. Use the same word document to fill in your explanation
Must follow these guidelines:
2.1. Be thorough with the concepts of Probability, Central Limit Theorem and Perform the
calculation stepwise
2.2. For True/False Questions, or short answer type questions explanation is must.
2.3. R & Python code for Univariate Analysis (histogram, box plot, bar plots etc.) the data
distribution to be attached
3. All the codes (executable programs) should execute without errors
4. Code modularization should be followed

© 2013 - 2021 360DigiTMG. All Rights Reserved.


5. Each line of code should have comments explaining the logic and why you are using that
function

© 2013 - 2021 360DigiTMG. All Rights Reserved.

You might also like