0% found this document useful (0 votes)
62 views7 pages

Ana Assignment 5019

Chi-square and t-tests are statistical tests used in analytical chemistry to evaluate results. The chi-square test determines if differences between observed and expected frequencies are statistically significant. It compares data to a chi-square distribution, and a result higher than the critical value rejects the null hypothesis. The t-test determines if the means of two groups are statistically different by comparing their means, standard deviations, and sample sizes to a t-distribution. It is used for hypothesis testing when variables may have unknown variances and follow a normal distribution. Both tests analyze data distributions to assess whether to accept or reject results based on probability.

Uploaded by

Pirate 001
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)
62 views7 pages

Ana Assignment 5019

Chi-square and t-tests are statistical tests used in analytical chemistry to evaluate results. The chi-square test determines if differences between observed and expected frequencies are statistically significant. It compares data to a chi-square distribution, and a result higher than the critical value rejects the null hypothesis. The t-test determines if the means of two groups are statistically different by comparing their means, standard deviations, and sample sizes to a t-distribution. It is used for hypothesis testing when variables may have unknown variances and follow a normal distribution. Both tests analyze data distributions to assess whether to accept or reject results based on probability.

Uploaded by

Pirate 001
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/ 7

Assignment analytical chemistry

Submitted to : Sir Hussain ullah sahib


Submitted by: Fozia Bibi
Roll number : 5019
Bs Chemistry
Question # 01
How Chi square and T test are used in Analytical chemistry to accept
or reject the results?

Chi-Square (χ2) Test :


 A chi-squared test, also written as χ2 test, is a statistical hypothesis test that is valid to
perform when the test statistic is chi-squared distributed under the null hypothesis,
specifically Pearson’s chi-squared test and variants thereof. Pearson’s chi-squared test is
used to determine whether there is a statistically significant difference between the
expected frequencies and the observed frequencies in one or more categories of a
contingency table.
 In the standard applications of this test, the observations are classified into mutually
exclusive classes. If the null hypothesis that there are no differences between the
classes in the population is true, the test statistic computed from the observations
follows a χ2 frequency distribution. The purpose of the test is to evaluate how likely the
observed frequencies would be assuming the null hypothesis is true.
 Test statistics that follow a χ2 distribution occur when the observations are independent
and normally distributed, which are assumptions often justified under the central limit
theorem. There are also χ2 tests for testing the null hypothesis of independence of a
pair of random variables based on observations of the pairs.
 Chi-squared tests often refer to tests for which the distribution of the test statistic
approaches the χ2 distribution asymptotically, meaning that the sampling distribution (if
the null hypothesis is true) of the test statistic approximates a chi-squared distribution
more and more closely as sample sizes increase.

Pearson’s chi-squared test


 In 1900, Pearson published a paper on the χ2 test which is considered to be one of the
foundations of modern statistics.[6] In this paper, Pearson investigated a test of
goodness of fit.
 Suppose that n observations in a random sample from a population are classified into k
mutually exclusive classes with respective observed numbers xi (for I = 1,2,…,k), and a
null hypothesis gives the probability by an observation
 Pearson dealt first with the case in which the expected numbers mi are large enough
known numbers in all cells , and reached the result that, in the limit as n becomes large,
X2 follows the χ2 distribution with k – 1 degrees of freedom.
 However, Pearson next considered the case in which the expected numbers depended
on the parameters that had to be estimated from the sample, and suggested that, with
the notation of mi being the true expected numbers and being the estimated expected
numbers, the difference will usually be positive and small enough to be omitted. In a
conclusion, Pearson argued that if we regarded X′2 as also distributed as χ2 distribution
with k – 1 degrees of freedom, the error in this approximation would not affect
practical decisions. This conclusion caused some controversy in practical applications
and was not settled for 20 years until Fisher’s 1922 and 1924 .

Other examples of chi-squared tests


One test statistic that follows a chi-squared distribution exactly is the test that the variance of a
normally distributed population has a given value based on a sample variance. Such tests are
uncommon in practice because the true variance of the population is usually unknown.
However, there are several statistical tests where the chi-squared distribution is approximately
valid:

Fisher’s exact test


For an exact test used in place of the 2 x 2 chi-squared test for independence, see Fisher’s exact
test.

Binomial test
For an exact test used in place of the 2 x 1 chi-squared test for goodness of fit, see Binomial
test.

Other chi-squared tests:


o Cochran–Mantel–Haenszel chi-squared test.
o McNemar’s test, used in certain 2 × 2 tables with pairing
o Tukey’s test of additivity
o The portmanteau test in time-series analysis, testing for the presence of autocorrelation

Likelihood-ratio tests in general statistical modelling, for testing whether there is evidence of
the need to move from a simple model to a more complicated one (where the simple model is
nested within the complicated one).
Using the chi-squared distribution to interpret Pearson’s chi-squared statistic requires one to
assume that the discrete probability of observed binomial frequencies in the table can be
approximated by the continuous chi-squared distribution. This assumption is not quite correct
and introduces some error.
To reduce the error in approximation, Frank Yates suggested a correction for continuity that
adjusts the formula for Pearson’s chi-squared test by subtracting 0.5 from the absolute
difference between each observed value and its expected value in a 2 × 2 contingency table.
This reduces the chi-squared value obtained and thus increases its p-value.

Chi-squared test for variance in a normal population


If a sample of size n is taken from a population having a normal distribution, then there is a
result (see distribution of the sample variance) which allows a test to be made of whether the
variance of the population has a pre-determined value. For example, a manufacturing process
might have been in stable condition for a long period, allowing a value for the variance to be
determined essentially without error. Suppose that a variant of the process is being tested,
giving rise to a small sample of n product items whose variation is to be tested. The test statistic
T in this instance could be set to be the sum of squares about the sample mean, divided by the
nominal value for the variance (i.e. the value to be tested as holding). Then T has a chi-squared
distribution with n – 1 degrees of freedom. For example, if the sample size is 21, the acceptance
region for T with a significance level of 5% is between 9.59 and 34.17.

Example chi-squared test for categorical data


Suppose there is a city of 1,000,000 residents with four neighborhoods: A, B, C, and D. A
random sample of 650 residents of the city is taken and their occupation is recorded as “white
collar”, “blue collar”, or “no collar”. The null hypothesis is that each person’s neighborhood of
residence is independent of the person’s occupational classification. The data are tabulated as:
A B C D total
White collar 90 60 104 95 349
Blue collar 30 50 51 20 151
No collar 30 40 45 35 150
Total 150 150 200 150 650
If the test statistic is improbably large according to that chi-squared distribution, then one
rejects the null hypothesis of independence.
A related issue is a test of homogeneity. Suppose that instead of giving every resident of each
of the four neighborhoods an equal chance of inclusion in the sample, we decide in advance
how many residents of each neighborhood to include. Then each resident has the same chance
of being chosen as do all residents of the same neighborhood, but residents of different
neighborhoods would have different probabilities of being chosen if the four sample sizes are
not proportional to the populations of the four neighborhoods. In such a case, we would be
testing “homogeneity” rather than “independence”. The question is whether the proportions of
blue-collar, white-collar, and no-collar workers in the four neighborhoods are the same.
However, the test is done in the same way.

Applications
 In cryptanalysis, the chi-squared test is used to compare the distribution of plaintext and
(possibly) decrypted ciphertext. The lowest value of the test means that the decryption
was successful with high probability. This method can be generalized for solving modern
cryptographic problems.
 In bioinformatics, chi-squared test is used to compare the distribution of certain
properties of genes (e.g., genomic content, mutation rate, interaction network
clustering, etc.) belonging to different categories (e.g., disease genes, essential genes,
genes on a certain chromosome etc.).

Conclusion:
 If chi-square calculated value is greater than Chi-square critical value then null-
hypothesis will be rejected .
 but if Chi-square calculated value is less than Chi-square critical value then our null
hypothesis will be fail to reject.

T-Test:
 A t-test is a type of inferential statistic used to determine if there is a significant
difference between the means of two groups, which may be related in certain features.
It is mostly used when the data sets, like the data set recorded as the outcome from
flipping a coin 100 times, would follow a normal distribution and may have unknown
variances. A t-test is used as a hypothesis testing tool, which allows testing of an
assumption applicable to a population.
 A t-test looks at the t-statistic, the t-distribution values, and the degrees of freedom to
determine the statistical significance. To conduct a test with three or more means, one
must use an analysis of variance.
 A t-test is a type of inferential statistic used to determine if there is a significant
difference between the means of two groups, which may be related in certain features.
 The t-test is one of many tests used for the purpose of hypothesis testing in statistics.
 Calculating a t-test requires three key data values. They include the difference between
the mean values from each data set (called the mean difference), the standard deviation
of each group, and the number of data values of each group.
 There are several different types of t-test that can be performed depending on the data
and type of analysis required.

Calculating T-Tests
Calculating a t-test requires three key data values. They include the difference between the
mean values from each data set (called the mean difference), the standard deviation of each
group, and the number of data values of each group.
The outcome of the t-test produces the t-value. This calculated t-value is then compared
against a value obtained from a critical value table (called the T-Distribution Table). This
comparison helps to determine the effect of chance alone on the difference, and whether the
difference is outside that chance range. The t-test questions whether the difference between
the groups represents a true difference in the study or if it is possibly a meaningless random
difference.
o A large t-score indicates that the groups are different.
o A small t-score indicates that the groups are similar.

There are three types of t-tests, and they are categorized as dependent and independent t-
tests.

Ambiguous Test Results


Consider that a drug manufacturer wants to test a newly invented medicine. It follows the
standard procedure of trying the drug on one group of patients and giving a placebo to another
group, called the control group. The placebo given to the control group is a substance of no
intended therapeutic value and serves as a benchmark to measure how the other group, which
is given the actual drug, responds.
After the drug trial, the members of the placebo-fed control group reported an increase in
average life expectancy of three years, while the members of the group who are prescribed the
new drug report an increase in average life expectancy of four years. Instant observation may
indicate that the drug is indeed working as the results are better for the group using the drug.
However, it is also possible that the observation may be due to a chance occurrence, especially
a surprising piece of luck. A t-test is useful to conclude if the results are actually correct and
applicable to the entire population.

T-Test Assumptions
1. The first assumption made regarding t-tests concerns the scale of measurement. The
assumption for a t-test is that the scale of measurement applied to the data collected
follows a continuous or ordinal scale, such as the scores for an IQ test.
2. The second assumption made is that of a simple random sample, that the data is
collected from a representative, randomly selected portion of the total population.
3. The third assumption is the data, when plotted, results in a normal distribution, bell-
shaped distribution curve.
4. The final assumption is the homogeneity of variance. Homogeneous, or equal, variance
exists when the standard deviations of samples are approximately equal.

Correlated (or Paired) T-Test :


The correlated t-test is performed when the samples typically consist of matched pairs of
similar units, or when there are cases of repeated measures. For example, there may be
instances of the same patients being tested repeatedly—before and after receiving a particular
treatment. In such cases, each patient is being used as a control sample against themselves.
The remaining two types belong to the independent t-tests. The samples of these types are
selected independent of each other—that is, the data sets in the two groups don’t refer to the
same values. They include cases like a group of 100 patients being split into two sets of 50
patients each. One of the groups becomes the control group and is given a placebo, while the
other group receives the prescribed treatment. This constitutes two independent sample
groups which are unpaired with each other

Equal Variance (or Pooled) T-Test :


The equal variance t-test is used when the number of samples in each group is the same, or the
variance of the two data sets is similar. The following formula is used for calculating t-value and
degrees of freedom for equal variance t-test

Unequal Variance T-Test :


The unequal variance t-test is used when the number of samples in each group is different, and
the variance of the two data sets is also different. This test is also called the Welch's t-test.

Conclusion
 Mathematically, the t-test takes a sample from each of the two sets and establishes the
problem statement by assuming a null hypothesis that the two means are equal. Based
on the applicable formulas, certain values are calculated and compared against the
standard values, and the assumed null hypothesis is accepted or rejected accordingly.
 If the null hypothesis qualifies to be rejected, it indicates that data readings are strong
and are probably not due to chance. The t-test is just one of many tests used for this
purpose. Statisticians must additionally use tests other than the t-test to examine more
variables and tests with larger sample sizes.

You might also like