8614 - Assignment 2 Solved (AG)
8614 - Assignment 2 Solved (AG)
ASSIGNMENT-02
Q.1 How is mean calculated? Also discuss its merits and demerits.
Ans-
Mode is the value that occurs with the greatest number of frequency. For
example- if the given set of values are 2, 3, 2, 4, 5, 2, 3, 1, 6 the mode here
would be 2 which appears thrice. However, when there are 2 or more values
appearing with same frequencies then the mode is said to be ill-defined. Such
series is called as bi-modal or multi-modal.
Mode is an appropriate measure than average and median under certain
circumstances. For instance, while studying the income earned by the workers
in a company, mode reflects the wages earned by a large number of workers.
Average income of the workers, on the other hand, may be much higher just
because few employees in higher positions are earning a very high level of
income.
Majority votes are considered in decision making where mode is applied to see
the choice preferred by a large number of people.
1. Individual Observations:
Example 1:
Calculate the mode from the data given below showing the marks obtained by
10 students.
75, 80, 82, 76, 82, 74, 75, 79, 82, 70
Solution:
The mode here is 82 as it appears with the highest frequency.
2. Discrete Series:
Example 2:
Calculate the mode for the data pertaining to the size of shoes.
Course: Educational Statistics (8614) Semester: Autumn, 2022
Solution:
The mode here is 6 as it has the highest frequency.
3. Continuous Series:
Mode for a data in the form of a continuous series is calculated using the
formula
Example 3:
Calculate the mode from the data given below pertaining to the marks
obtained by the students in a test.
Solution:
By observation, it is known that the modal class is 40 – 50 as this class has the
highest frequency.
The frequencies are grouped in two’s in the second column. In the third
column, the first frequency is left out and the remaining frequencies are
grouped in two’s. In the fourth column, the frequencies are grouped in three’s.
In the fifth column, the first frequency is left out and the remaining
frequencies are grouped in three’s. In the sixth column, the first two
frequencies are left out and the remaining frequencies are grouped in three’s.
In each of these columns the maximum value is observed.
The analysis table is prepared taking the column numbers on the left and the
probable values of mode on the right. The probable values of mode are those
values against which the frequencies are the highest in the grouping table. The
values are entered by means of a bar in the analysis table. The column total is
then taken and the one which has the maximum value is the modal value.
Example 4:
Calculate the value of mode for the following data:
4. When mode is computed through different methods, the value may differ in
each of the methods.
When you have collected data from a sample, you can use inferential statistics
to understand the larger population from which the sample is taken.
• making estimates about populations (for example, the mean SAT score
of all 11th graders in the US).
• testing hypotheses to draw conclusions about populations (for example,
the relationship between SAT scores and family income).
Table of contents
Descriptive statistics
Using descriptive statistics, you can report characteristics of your data:
Inferential statistics
Most of the time, you can only acquire data from samples, because it is too
difficult or expensive to collect data from the whole population that you’re
interested in.
With inferential statistics, it’s important to use random and unbiased sampling
methods. If your sample isn’t representative of your population, then you can’t
make valid statistical inferences or generalize.
Sampling error arises any time you use a sample, even if your sample is
random and unbiased. For this reason, there is always some uncertainty in
inferential statistics. However, using probability sampling methods reduces this
uncertainty.
There are two important types of estimates you can make about the
population: point estimates and interval estimates.
Both types of estimates are important for gathering a clear idea of where a
parameter is likely to lie.
Confidence intervals
A confidence interval uses the variability around a statistic to come up with an
interval estimate for a parameter. Confidence intervals are useful for
estimating parameters because they take sampling error into account.
While a point estimate gives you a precise value for the parameter you are
interested in, a confidence interval tells you the uncertainty of the point
estimate. They are best used in combination with each other.
A 95% confidence interval means that if you repeat your study with a new
sample in exactly the same way 100 times, you can expect your estimate to lie
within the specified range of values 95 times.
Although you can say that your estimate will lie within the interval a certain
percentage of the time, you cannot say for sure that the actual population
parameter will. That’s because you can’t know the true value of the population
parameter without collecting data from the full population.
Course: Educational Statistics (8614) Semester: Autumn, 2022
However, with random sampling and a suitable sample size, you can
reasonably expect your confidence interval to contain the parameter a certain
percentage of the time.
Example: Point estimate and confidence intervalYou want to know the average
number of paid vacation days that employees at an international company
receive. After collecting survey responses from a random sample, you calculate
a point estimate and a confidence interval.
Your point estimate of the population mean paid vacation days is the sample
mean of 19 paid vacation days.
With random sampling, a 95% confidence interval of [16 22] means you can be
reasonably confident that the average number of vacation days is between 16
and 22.
Hypothesis testing
Hypothesis testing is a formal process of statistical analysis using inferential
statistics. The goal of hypothesis testing is to compare populations or assess
relationships between variables using samples.
When your data violates any of these assumptions, non-parametric tests are
more suitable. Non-parametric tests are called “distribution-free tests”
because they don’t assume anything about the distribution of the population
data.
Course: Educational Statistics (8614) Semester: Autumn, 2022
Comparison tests
Comparison tests assess whether there are differences in means, medians or
rankings of scores of two or more groups.
To decide which test suits your aim, consider whether your data meets the
conditions necessary for parametric tests, the number of samples, and
the levels of measurement of your variables.
Means can only be found for interval or ratio data, while medians and rankings
are more appropriate measures for ordinal data.
Correlation tests
Correlation tests determine the extent to which two variables are associated.
Course: Educational Statistics (8614) Semester: Autumn, 2022
The chi square test of independence is the only test that can be used
with nominal variables.
Spearman’s r No Ordinal/interval/ratio
variables
Regression tests
Regression tests demonstrate whether changes in predictor variables cause
changes in an outcome variable. You can decide which regression test to use
based on the number and types of variables you have as predictors and
outcomes.
Most of the commonly used regression tests are parametric. If your data is not
normally distributed, you can perform data transformations.
Data transformations help you make your data normally distributed using
mathematical operations, like taking the square root of each value.
two variables have any kind of relationship, whereas p-value tells us if the
result of an experiment is statistically significant. In this tutorial, we will be
taking a look at how they are calculated and how to interpret the numbers
obtained.
What is correlation?
Correlation coefficient is used in statistics to measure how strong a
relationship is between two variables. There are several types of correlation
coefficients (e.g. Pearson, Kendall, Spearman), but the most commonly used is
the Pearson’s correlation coefficient. This coefficient is calculated as a number
between -1 and 1 with 1 being the strongest possible positive correlation and -
1 being the strongest possible negative correlation.
A positive correlation means that as one number increases the second number
will also increase. A negative correlation means that as one number increases
the second number decreases. However, correlation does not always imply
causation — correlation does not tell us whether change in one number is
directly caused by the other number, only that they typically move together.
Learn more about the Pearson correlation formula, and how to implement it in
SQL here. To understand how correlation works, let’s look at a chart of height
vs weight.
We can observe that with increase in weight, the height also increases – which
indicates they are positively correlated. Also, the correlation coefficient in this
case is 0.88, which supports our finding. Learn more about correlation and how
to implement it in Excel here.
Course: Educational Statistics (8614) Semester: Autumn, 2022
What is a p-value?
P-value evaluates how well your data rejects the null hypothesis, which states
that there is no relationship between two compared groups. Successfully
rejecting this hypothesis tells you that your results may be statistically
significant. In academic research, p-value is defined as the probability of
obtaining results ‘as extreme’ or ‘more extreme’, given that the null
hypothesis is true — essentially, how likely it is that you would receive the
results (or more dramatic results) you did assuming that there is no correlation
or relationship (e.g. the thing that you’re testing) among the subjects. To
understand what this means, let us look at an example.
Assuming the null hypothesis is true (the coin is fair), let’s calculate the
probabilities of the various possible outputs i.e 0 heads & 10 tails, 1 head & 9
tails, 2 heads & 8 tails, and so on.
Where,
n = no. of trials = 10
r = no. of successes (heads)
p = probability of a success = 1/2
1-p = probability of a failure = 1/2
Let’s consider a ‘success’ to be when heads appears in the coin toss. Also, it
won’t make a difference if ‘success’ is considered to be heads or tails. Let’s first
calculate the probability of obtaining 5 heads and 5 tails in 10 coin flips.
Let’s plot the probabilities to understand the intuition behind the above
calculation:
We can observe from the chart that the probability of getting 5 heads is the
highest, and the probability of getting 0 heads or 0 tails is the lowest. Now,
let’s assume we get the output of this experiment as “9 heads and 1 tail”.
Now, we add the probabilities of all the possible outputs of the experiment
which are as probable as ‘9 heads and 1 tail’ and less probable than ‘9 heads
and 1 tail’.
P-value = P(9 heads and 1 tail) + P(10 heads and 0 tail) + P(9 tails and 1 head) +
P(10 tails and 0 heads)
Course: Educational Statistics (8614) Semester: Autumn, 2022
Now, we need to check whether the p-value is significant or not. This is done
by specifying a significance cutoff, known as the alpha value. Alpha is usually
set to 0.05, meaning the probability of achieving the same or more extreme
results assuming the null hypothesis is 5%. If the p-value is less than the
specified alpha value, then we reject the null hypothesis. Hence, we reject the
hypothesis that ““The coin is fair with equal probability of heads and
tails” and conclude that the coin is biased.
Conclusion
Though correlation and p-value provides us with the relationship between
variables, care should be taken to interpret them correctly. Correlation tells us
whether two variables have any sort of relationship and it does not imply
causation. If two variables A and B are highly correlated, there are several
possible explanations: (a) A influences B; (b) B influences A; (c) A and B are
influenced by one or more additional variables; (d) the relationship observed
between A and B was a chance error. Similarly, p-value should not be misused
to produce a statistically significant result. If analysis is done by exhaustively
searching various combinations of variables for correlation, then it is known
as p-hacking.
The t- and z-test methods developed in the 20th century were used for
statistical analysis until 1918, when Ronald Fisher created the analysis of
variance method.12 ANOVA is also called the Fisher analysis of variance, and
it is the extension of the t- and z-tests. The term became well-known in 1925,
after appearing in Fisher's book, "Statistical Methods for Research
Workers."3 It was employed in experimental psychology and later expanded
to subjects that were more complex.
Course: Educational Statistics (8614) Semester: Autumn, 2022
The ANOVA test allows a comparison of more than two groups at the same
time to determine whether a relationship exists between them. The result of
the ANOVA formula, the F statistic (also called the F-ratio), allows for the
analysis of multiple groups of data to determine the variability between
samples and within samples.
If no real difference exists between the tested groups, which is called the null
hypothesis, the result of the ANOVA's F-ratio statistic will be close to 1. The
distribution of all possible values of the F statistic is the F-distribution. This is
actually a group of distribution functions, with two characteristic numbers,
called the numerator degrees of freedom and the denominator degrees of
freedom.
Chi-square tests are often used to test hypotheses. The chi-square statistic
compares the size of any discrepancies between the expected results and the
actual results, given the size of the sample and the number of variables in the
relationship.
For these tests, degrees of freedom are used to determine if a certain null
hypothesis can be rejected based on the total number of variables and
samples within the experiment. As with any statistic, the larger the sample
size, the more reliable the results.
Course: Educational Statistics (8614) Semester: Autumn, 2022
Independence
When considering student gender and course choice, a χ2 test for
independence could be used. To do this test, the researcher would collect
data on the two chosen variables (gender and courses picked) and then
compare the frequencies at which male and female students select among the
offered classes using the formula given above and a χ2 statistical table.2
If there is no relationship between gender and course selection (that is, if they
are independent), then the actual frequencies at which male and female
students select each offered course should be expected to be approximately
equal, or conversely, the proportion of male and female students in any
selected course should be approximately equal to the proportion of male and
female students in the sample.2
A χ2 test for independence can tell us how likely it is that random chance can
explain any observed difference between the actual frequencies in the data
and these theoretical expectations.
Goodness-of-Fit
χ2 provides a way to test how well a sample of data matches the (known or
assumed) characteristics of the larger population that the sample is intended
to represent. This is known as goodness of fit.
If the sample data do not fit the expected properties of the population that
we are interested in, then we would not want to use this sample to draw
conclusions about the larger population.3
Course: Educational Statistics (8614) Semester: Autumn, 2022
Example
For example, consider an imaginary coin with exactly a 50/50 chance of
landing heads or tails and a real coin that you toss 100 times. If this coin is fair,
then it will also have an equal probability of landing on either side, and the
expected result of tossing the coin 100 times is that heads will come up 50
times and tails will come up 50 times.4
In this case, χ2 can tell us how well the actual results of 100 coin flips compare
to the theoretical model that a fair coin will give 50/50 results. The actual toss
could come up 50/50, or 60/40, or even 90/10. The farther away the actual
results of the 100 tosses is from 50/50, the less good the fit of this set of
tosses is to the theoretical expectation of 50/50, and the more likely we might
conclude that this coin is not actually a fair coin.4
A chi-square test is appropriate for this when the data being analyzed are
from a random sample, and when the variable in question is a categorical
variable.2 A categorical variable is one that consists of selections such as type
of car, race, educational attainment, male or female, or how much somebody
likes a political candidate (from very much to very little).
In addition, the chi-square test cannot establish whether one variable has a
causal relationship with another. It can only establish whether two variables
are related.