Chemistry Net: 08/01/2015 - 09/01/2015

One-Sample T-Test in Chemical Analysis – Statistical Treatment of Analytical Data

Statistical Treatment of Analytical Data - One-Sample t-test

Statistical Treatment of Analytical Data - One-Sample t-test in Chemical Analysis

A one-sample t-test is used to compare two means provided that data are normally distributed (plot of the frequencies of data is a histogram of normal distribution). A t-test is a parametric test and relies on distributional assumptions. It is a useful tool in analytical work when two means have to be compared. A situation like this is presented in the following example.

A new analytical instrument is tested in a chemical laboratory by determining the mass m (in mg) of Cu contained in a certain mass (i.e. 1 g) of a certified reference material (CRM). The analysis certificate of the CRM states that the average mass of Cu (in mg) is 4.54 per 1 g of sample. Fifty samples of 1 g of the CRM were analyzed by the new analytical instrument and the results are shown in Fig. I.1. At the 5% level of significance, does the instrument work properly?

Fig. I.1: Analytical results obtained by analyzing the CRM for its content in Cu (mg / g of CRM) by a new analytical instrument

A t-test for one sample can be used in this case, a sample mean would be computed and that sample mean would be compared to the specified value given 4.54 mg /g of CRM. A statistical software such as SPSS will be used to do all of the hard work in 5 steps:

Step #1

State the hypotheses:

Ho: The mean mass of Cu in the fifty 1 g samples of CRM analyzed equals 4.54 mg

Ha: The mean mass of Cu in the fifty 1 g samples of CRM analyzed does not equal 4.54 mg

Step #2

Choose a significance level:

In this case is given at the 5% level of significance (or .05)

Step #3

State all the assumptions:

The t-test is a so called parametric test based on the normal distribution. A parametric test is one that requires data from one of the large catalog of distributions that statisticians have studied – such as the normal distribution.

Therefore, the most important assumption in this case is that the results in Fig. I.1 are normally distributed. This can be tested as follows: i) visually by plotting a histogram (Fig. I.2) ii) by using the Kolmogorov-Smirnov test (a nonparametric test).

i) In order to conduct visually for normality using SPSS go to Graphs → Legacy Dialogs → Histogram (Fig. I.2) and then choose as variable the one tested in this case Weight_Cu.

Fig. I.2: Drawing a histogram using the SPSS (version 20) data editor and the analytical results in Fig. I.1

Check the box next to Display Normal Curve (Fig. I.3).

Fig. I.3: Selecting the variable Weight_Cu – in order to draw a histogram using SPSS (version 20)

The histogram obtained (Fig. I.4) does not appear to have a perfect bell-shaped curve - as a normal distribution curve has - but it is close enough taking into consideration that a sample is tested and not the entire population. There are more data in the middle and less towards the far right or far left. Almost half of the data are below and above the mean 4.50 and there are no any extreme values (outliers). All the above observations show that the assumption of normality seems reasonable and therefore the t-test can be used.

Fig. I.4: A histogram constructed from the analytical results obtained by analyzing the CRM for its content in Cu (mg / g of CRM) by a new analytical instrument. The histogram was plotted using SPSS (version 20)

The Kolmogorov-Smirnov test can also be used to evaluate the normality assumption. In order to conduct this test, go to Analyze → Nonparametric Tests → Legacy Dialogs → 1-S K-S (Fig. I.5).

Fig. I.5: Checking for normality using the  Kolmogorov-Smirnov test (SPSS 20 Data Editor) that is a non-parametric test

The output shows that the mean mass of Cu in the 50 samples (N=50) is equal to 4.4998 (Mean = 4.4998) with a minimum mass value at 4.32 and a maximum at 4.69 (please notice that the mean mass is close to the mass reported by the CRM certificate). The output also shows that the Asymp. Sig. (2-tailed) is 0.843 (that is also known as the p value) (Fig. I.6). Since the p value is above 0.05 the normality assumption cannot be rejected and therefore the distribution is considered normal.

Fig. I.6: Output of the Kolmogorov-Smirnov test for the values in Fig. I.1(SPSS 20 Data Editor) that is a non-parametric test

The p-value expresses the probability that you would be in error if you rejected that the distribution is normal. Therefore, the distribution can be considered normal and the t-test can be used.

To run the t-test using SPSS (version 20) go to Analyze → Compare Means → One-Sample t Test.

Choose Weight_Cu as the Test Variable and 4.54 (CRM’s mean value) as Test Value (Fig. I.7) and press O.K.

Fig. I.7: Selecting a Test Variable and Test_Value in SPSS 20. In this case the test variable is Weight_Cu and the test value 4.54 (CRM’s mean value in Cu)

The output shows (Fig. I.8) sample statistics for the test variable Weight_Cu ( N = 50, Mean = 4.4998). The t-test output has a Sig. (2-tailed) p value of 0.002 that is lower than 0.05 and therefore the Null Hypothesis (Ho: The mean mass of Cu in the fifty 1 g samples of CRM analyzed equals 4.54 mg and therefore the instrument works properly) is rejected.

Fig. I.8: The t-test output using SPSS 20. The test variable is Weight_Cu and the test value 4.54 (CRM’s mean value in Cu). The output shows that the null hypothesis must be rejected since the p-value =0.002 is lower than 0.05

When the null is rejected the alternate hypothesis is considered true (Ha: The mean mass of Cu in the fifty 1 g samples of CRM analyzed does not equal 4.54 mg and therefore the instrument does not work properly).



References

  1. D.B. Hibbert, J.J. Gooding, "Data Analysis for Chemistry", Oxford Univ. Press, 2005
  2. J.C. Miller and J.N Miller, “Statistics for Analytical Chemistry”, Ellis Horwood Prentice Hall, 2008
  3. Steven S. Zumdahl, “Chemical Principles” 6th Edition, Houghton Mifflin Company, 2009
  4. D. Harvey, “Modern Analytical Chemistry”, McGraw-Hill Companies Inc., 2000
  5. R.D. Brown, “Introduction to Chemical Analysis”, McGraw-Hill Companies Inc, 1982
  6. S.L.R. Ellison, V.J. Barwick, T.J.D. Farrant, “Practical Statistics for the Analytical Scientist”, 2nd Edition, Royal Society of Chemistry, 2009
  7. A. Field, “Discovering Statistics using SPSS” , Sage Publications Ltd., 2005

Key Terms

statistical tests, normal population, chi-squared test, data points, one-sample t-test, QQ plot, statistical treatment of analytical data

Entropy changes ΔS and Thermodynamic Equilibrium – Solved Examples

Solved Examples - Entropy changes and thermodynamic equilibrium

Entropy Changes ΔS and Thermodynamic Equilibrium – Solved Examples

 

In a previous post entitled “Entropy, Free Energy and Thermodynamic Equilibrium” the Boltzmann definition of entropy was given and how entropy changes ΔS are associated with chemical processes was discussed. Below, some examples are given regarding entropy changes ΔS and chemical reactions.

Example #1

Choose the reaction expected to have the greatest increase in entropy:

a)  N2(g) + O2(g) ———› 2 NO(g)

b)  H2O (l)    ———›   H2O (g)

c)  2 XeO3(s)  ———›   2 Xe(g) + 3 O2(g)

d) C(s) + O2(g)   ———›  CO2 (g)

 

Answer:

The reaction with the greatest increase in the moles of gas will have the greatest increase in entropy. Answer (c) is correct. In general, when a reaction involves gaseous molecules and the number of gaseous products (or moles of gaseous products) is greater than the number of molecules of gaseous reactants (or moles of gaseous reactants) the entropy change ΔS increases (ΔS > 0).

More gaseous molecules means more possible configurations and therefore a greater probability to occur.

 

Example #2

Predict the sign of ΔS° for the oxidation of SO2 in air:

2 SO2(g)  +  O2(g)  ———›    2 SO3(g)

 

Answer:

Three molecules of gaseous reactants produce 2 molecules of gaseous products. The number of gaseous products is less than the number of the reactants and therefore ΔS < 0


Relevant Posts

Entropy, Free Energy and Thermodynamic Equilibrium

Phase Changes - Energy Changes - Heating Curves


References

  1. P. Atkins, J. de Paula, “Physical Chemistry”, 9th Edition, W. H. Freeman (2009)
  2. I. N. Levine, “Physical Chemistry”, 6th Edition, McGraw-Hill (2008)
  3. S. S. Zumdahl, “Chemical Principles”, 6th Edition, Houghton Mifflin Company (2009)
  4. A. W. Adamson, A. P. Gast, “Physical Chemistry of Surfaces”, John Wiley & Sons (1997

Key Terms

entropy changes examples, thermodynamic equilibrium,, ΔS, entropy increase and chemical reactions,

Entropy, Free Energy and Thermodynamic Equilibrium

Entropy, free energy and thermodynamic equilibrium

Entropy, Free Energy and Thermodynamic Equilibrium

Chemical reactions are performed by mixing the reactants and regulating external conditions such as temperature and pressure. Two basic questions though arise:

  1. Is it possible for the reaction to occur at the selected conditions?
  2. If the reaction proceeds, what determines the ratio of products and reactants at equilibrium? 

Both questions are answered by chemical thermodynamics:

  • Thermodynamics can tell us whether a proposed reaction is spontaneous (possible) under particular conditions even before the actual experiment.
  • Thermodynamics can also predict the ratio of products and reactants at equilibrium provided that the reaction is spontaneous.

Note: Thermodynamics cannot answer though how fast a reaction will proceed. The field of Chemical Kinetics studies reaction rates.

After many years of observation scientists concluded that the characteristic common to all spontaneous processes (processes that occur in a definite direction without outside intervention) is an increase in the property called entropy (S). . An example of a physical spontaneous process is shown below in Fig. I.1. A ball rolls down spontaneously a hill but never spontaneously rolls back up the hill.

Fig. I.1: A physical spontaneous process is shown. The ball rolls down the hill spontaneously. The reverse process – roll back up the hill - is not spontaneous.

An example of a chemical spontaneous process is the reaction of iron with oxygen (rusting of iron). The forward reaction is a spontaneous process (natural process that may take years to occur) but the product iron oxide in rust does not spontaneously change back to iron metal and oxygen.

4Fe(s) + 3O2 (g)   -------›  2 Fe2O3 (s)

Note: 1) Processes that are spontaneous in one direction are non-spontaneous in the reverse direction  2) The total energy in the above examples of spontaneous processes remains constant and therefore the direction of the processes cannot be attributed to energy changes. Therefore, the First law of Thermodynamics cannot explain why  spontaneous processes (natural processes) occur. As a reminder the First Law of Thermodynamics states that the energy of the universe is constant. The driving force behind spontaneous processes (natural processes) is the change in the entropy (ΔS) of the universe.

The 2nd Law of Thermodynamics states: In a spontaneous process, the entropy of the universe increases  ΔSuniverse = ΔSsys + ΔSsurr > 0

 

How entropy is defined?

A precise, quantitative definition of entropy was proposed by the Austrian physicist Ludwig Boltzmann in the late 19th century. According to this definition entropy is related to probability:

If a system has several states available to it, the one that can be achieved in the greatest number of ways (has the largest number of microstates) is the one most likely to occur. The state with the greatest probability has the highest entropy.

S = kB . lnΩ

Where,

kB is Boltzmann’s constant (R/NA)

Ω is the number of microstates corresponding to a given state (including both position and energy)

Note: The above definition of entropy is not useful in a practical sense for the typical types of samples used by chemists because those samples contain so many components (for example 1 mole of gas contains 6.022 x 1023 individual particles).

Let us examine how entropy S and entropy changes (ΔS) – entropy changes can be thought as disorder – can explain the occurrence of spontaneous processes. As an example let us consider four “tagged” gas molecules (labelled 1, 2, 3 and 4) which are concentrated on the left part of the container under vacuum (Fig. I.2). The stopcock is opened and the gas molecules are allowed to equilibrate without any intervesion. If enough times elapses half of the molecules will be in each container.

In the process described above and shown in Fig. I.2 the following are observed:

  • There is no any energy change (the total energy remains constant)
  • The degree of disorder (entropy) increases after the stopcock is removed and the molecules are uniformly distributed  

How can be explained that in such a spontaneous process – a process where entropy increase is observed - the molecules tend to get uniformly distributed in the two containers?

Molecular statistics answers this question by considering the probabilities of the possible arrangements of the molecules in the two containers. Each of these arrangements defines a macrostate. There are five possible arrangements (macrostates) of the four molecules in the two containers are:

  • All 4 molecules in the left container
  • Three molecules in the left container and 1 in the right
  • Two molecules in the left container and two in the right container
  • Three molecules in the right container and 1 in the left
  • All 4 molecules in the right container

There is also a number of ways (configurations) called microstates that each of the above arrangements can be achieved:

 

Fig. I.2: The 16 possible microstates of a system of 4 molecules that may occupy either side of a container.

For example from Fig. I.2 the following are observed:

There is only one configuration that all four molecules are in the left container (1 microstate, Microstate #1).

There are four configurations that three molecules are in the left container and one molecule in the right container (4 microstates, Microstates #2 and #3 and #4 and #5).

There are six configurations that two molecules are in the left container and two in the right container (6 microstates, Microstates #6 up to #11 inclusive)

There are four configurations that three of the molecules are in the right container and one molecule in the left container (4 microstates, Microstates #12 to #15 inclusive).

There is only one configuration that all four molecules are in the right container (1 microstate, Microstate #16).

The above described arrangements (macrostates) and configurations (microstates) of the molecules are summarized in Table I.1 below.

The probability that one particular molecule is in the left container at a given time is ½. A second specific molecule may be either in the left or in the right container so the probability that both are in the left is ½ x ½ = ¼. The probability that all 4 molecules are in the left container is: ½ x ½ x ½ x ½ = 1/16

Continuing this argument for N = 6.023 * 1023 molecules the probability that all will be on the left is equal to:

½ x ½ x…. x ½ = (½)N ≈ 0  (where N = 6.023 * 1023

This is a very small probability almost equal to zero.

From Table I.1 it becomes apparent that:

The greater the number of microstates that correspond to a given macrostate, the greater the probability of that macrostate.

For example, the arrangement (macrostate) 2 molecules in the left container and 2 in the right has the greatest number of possible configurations (microstates) – 6 microstates - of the molecules. The probability that this macrostate occurs is the highest and equal to  6/16 = 3/8. As a matter of fact this macrostate is observed when the four molecules are allowed to move freely in the two containers.

The arrangement (macrostate) with the second highest probability to occur is 3 molecules in the left and 1 molecule in the right container or  3 molecules in the right and 1 molecule in the left container. The number of the possible configurations of the molecules is 4 in this case and the corresponding probability 4/16 = ¼.

Therefore, a gas placed in one end of a container will spontaneously expand to fill the entire container evenly because for a large number of gas molecules there is a huge number of microstates corresponding to equal number of molecules in both ends.

The consequences of this principle are dramatic for large number of molecules in chemical systems (as shown above) because of the following:

  • There is a huge number of particles (statistical predictions are always more accurate for larger sample)
  • The change process proceeds spontaneously (no external intervention is needed)

Table I.1: Macrostates, microstates and corresponding probabilities of a system of 4 molecules that may occupy either side of a container.
Macrostate
Configurations (microstates
Probability
Microstate # (Fig. I.2)

4 molecules in the left container

1

1/16
1
3 molecules in the left and 1 molecule in the right container
4
4/16 = 1/4
2, 3, 4, 5
2 molecules in the left and 2 molecules in the right container
6
6/16 = 3/8
6, 7, 8, 9, 10, 11
3 molecules in the right and 1 molecule in the left container
4
4/16 = 1/4
12, 13, 14, 15

4 molecules in the right container

1
1/16
16

 

How entropy is associated with chemical processes?

Entropy changes, ΔS – not S – are associated with changes of state (from solid to liquid, liquid to gas…). Since a change of state – for example from solid to liquid – at a substance’s melting point is a reversible process, we can calculate the change in entropy for this process by using the equation:

ΔS = qrev / T = ΔΗ / Τ      (at constant temperature T and pressure P)

Where:

ΔS change in entropy that occurs during the change of state

qrev  = ΔΗ / Τ  energy required for the reversible process to occur (for example energy required to melt 1 mole of solid at the melting point, ΔΗ is the enthalpy change of fusion)

T is the temperature where the change of state occurs (melting point, boiling point)

Equation (2) is a very important relationship since it relates entropy changes (ΔS) to macroscopic properties such as heat and volume since these changes are relatively easy to measure. The definition of entropy given by equation (1) is based on probability while the one by (2) on thermodynamic properties.

 

Which processes are called reversible? Which processes are called irreversible?

Reversible process is a process that the system changes in such a way that the system and surroundings can be put back in their original states by exactly reversing the process.

An example of a reversible process is the heat that can be transferred between two bodies by changing the temperature difference between them in infinitesimal steps each of which can be undone by reversing the temperature difference

 

An irreversible process cannot be undone by reversing the change of the system. Spontaneous processes are irreversible.

An example of an irreversible process is the free expansion of a gas into a vacuum (Fig. I.2).

Solved examples on entropy changes are given in the post entitled “Entropy changes ΔS and Thermodynamic Equilibrium – Solved Examples”.


Relevant Posts

Free energy, entropy and thermodynamic equilibrium

Gas Laws - Ideal Gas Law


References

  1. P. Atkins, J. de Paula, “Physical Chemistry”, 9th Edition, W. H. Freeman (2009)
  2. I. N. Levine, “Physical Chemistry”, 6th Edition, McGraw-Hill (2008)
  3. S. S. Zumdahl, “Chemical Principles”, 6th Edition, Houghton Mifflin Company (2009)
  4. A. W. Adamson, A. P. Gast, “Physical Chemistry of Surfaces”, John Wiley & Sons (1997

Key Terms

spontaneous processes, reversible process, irreversible process, entropy, entropy changes, ,ΔS, , microstate, macrostate, Boltzman's constant, chemical thermodynamics