Assignment
Assignment
Q2) Identify the Data types, which were among the following
Nominal, Ordinal, Interval, Ratio.
Data Data Type
Gender Nominal
High School Class Ranking Ordinal
Celsius Temperature Interval
Weight Ratio
Hair Color Nominal
Socioeconomic Status Nominal
Fahrenheit Temperature Interval
Height Ratio
Type of living accommodation Nominal
Level of Agreement Ordinal
IQ(Intelligence Scale) Interval
Sales Figures Ratio
Blood Group Nominal
Time Of Day Ordinal
Time on a Clock with Hands Ordinal
Number of Children Ratio
Religious Preference Nominal
Barometer Pressure Ratio
SAT Scores Interval
Years of Education Ratio
Q3) Three Coins are tossed, find the probability that two heads and one tail are
obtained?
Ans: The sample space for tossing the 3 coins is
S={hhh, ttt, hht, thh, tth, htt, hth, tht}
P(2h’s,t)=2/8 =0.25
Q4) Two Dice are rolled, find the probability that sum is
a) Equal to 1
b) Less than or equal to 4
c) Sum is divisible by 2 and 3
Ans:
a) 0
b) 6/36 =0.166
c) (1 , 5) , (3 , 3) , (4 , 2) , (5 , 1) , (6 , 6)
Probability for Sum is divisible by 2 and 3 =5/36 =0.138
Q5) 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:
2 red, 3 green and 2 blue balls =7 balls
Number of ways drawing 2 ball is= 7 C 2= 21
2 balls drawn ,none of the ball is blue=5C 2=¿ 10
The probability that none of the balls drawn is blue=10/21 =0.478
Q6) 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)
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.120
Child A – probability of having 1 candy = 0.015.
Child B – probability of having 4 candies = 0.20
Ans:
Expected number of candies for a randomly selected child
P(RC) = 1 * 0.015 + 4*0.20 + 3 *0.65 + 5*0.005 + 6 *0.01 + 2 * 0.12
P(RC) =3.090
Q7) 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 also Comment about the values/ Draw some inferences.
Use Q7.csv file
Ans:
The given data set Q7.csv has 4 columns and 32 rows. The attributes are
not-null. In this data set the first column is an objective type data and the
remaining 3 columns are float type data.
The mean of the attributes ‘Points’, ’Score’, ’Weigh’ are 3.596563, 3.217250,
17.848750 respectively.
The median of the attributes ‘Points’, ’Score’, ’Weigh’ are 3.695, 3.325, 17.710
respectively.
The mode of the attributes ‘Points’, ’Score’, ’Weigh’ are 3.07, 3.44, 17.02
respectively.
Q9) Calculate Skewness, Kurtosis & draw inferences on the following data
Cars speed and distance
Use Q9_a.csv
SP and Weight(WT)
Use Q9_b.csv
Ans:
For speed we got skewness and kurtosis are negative values which means the
speed of a car is negatively skewed that is the data falls on the right hand side.
Kurtosis is also negative value so we can say the shape of the speed of a car is
platykurtic.
For distance we got skewness and kurtosis are positive values which means the
distance of a car is positively skewed that is the data falls on the lefthand side.
Kurtosis is also positive value so we can say the shape of the distance of a car is
leptokurtic.
For SP we got skewness and kurtosis are positive values which means the SP of a
car is positively skewed that is the data falls on the left hand side.
Kurtosis is also positive value so we can say the shape of the SP of a car is
leptokurtic.
For WT we got skewness negative values which means the WT of a car is
negatively skewed that is the data falls on the right hand side.
Kurtosis is positive value so we can say the shape of the WT of a car is leptokurtic
Ans: Given
Sample size=2000
Mean =200
Standard deviation=30
S
Using the t-distribution x−t n
√
94% confidence level, with 200 - 1 = 199 df, the critical value is t = 1.8916
96% confidence level, with 200 - 1 = 199 df, the critical value is t =2.0673
98% confidence level, with 200 - 1 = 199 df, the critical value is t = 2.3452
34,36,36,38,38,39,39,40,40,41,41,41,41,42,42,45,49,56
1) Find mean, median, variance, standard deviation.
2) What can we say about the student marks?
Ans:
1) Mean of the scores = 41
Median of the scores = 40.5
Variance = 24.1111
Standard deviation = 4.9103
2)The student scores were fluctuated with the standard deviation of 5.
The highest score obtained by students is 56 and the lowest score is 34.
Q13) What is the nature of skewness when mean, median of data are equal?
Ans: mean=median=0 data is symmetric.
Q14) What is the nature of skewness when mean > median ?
Ans: mean > median data is positively skewed.
Q15) What is the nature of skewness when median > mean?
Ans: median > mean data is negatively skewed.
Q16) What does positive kurtosis value indicates for a data ?
Ans: Positive values of kurtosis indicate that distribution is peaked and possesses
thick tails.
Q17) What does negative kurtosis value indicates for a data?
Ans: A distribution with a negative kurtosis value indicates that the distribution
has lighter tails.
Q18) Answer the below questions using the below boxplot visualization.
What can we say about the distribution of the data?
What is nature of skewness of the data?
What will be the IQR of the data (approximately)?
Ans:
- The above Boxplot is not normally distributed the median is towards the
higher value.
- The data is a skewed towards left. The whisker range of minimum value
is greater than maximum.
- The Inter Quantile Range = Q3 Upper quartile – Q1 Lower Quartile
= 18 – 10 =8.
Q19) Comment on the below Boxplot visualizations?
Draw an Inference from the distribution of data for Boxplot 1 with respect
Boxplot 2.
Ans: There are no outliers in the first Boxplot.
Both the box plot shares the same median that is approximately in a range
between 275 to 250 and they are normally distributed with zero to no skewness
neither at the minimum or maximum whisker range.
Q 20) Calculate probability from the given dataset for the below cases
b)
Q 22) Calculate the Z scores of 90% confidence interval,94% confidence interval,
60% confidence interval
Ans:
Q 23) Calculate the t scores of 95% confidence interval, 96% confidence interval,
99% confidence interval for sample size of 25
Ans:
Q 24) A Government company claims that an average light bulb lasts 270
days. A researcher randomly selects 18 bulbs for testing. The sampled bulbs
last an average of 260 days, with a standard deviation of 90 days. If the
CEO's claim were true, what is the probability that 18 randomly selected
bulbs would have an average life of no more than 260 days
Hint:
rcode pt(tscore,df)
df degrees of freedom