text:
Thermodynamics
Get Thermodynamics essential facts below. View Videos or join the Thermodynamics discussion. Add Thermodynamics to your PopFlock.com topic list for future reference or share this resource on social media.
Thermodynamics

Annotated color version of the original 1824 Carnot heat engine showing the hot body (boiler), working body (system, steam), and cold body (water), the letters labeled according to the stopping points in Carnot cycle.

Thermodynamics is a branch of physics that deals with heat, work, and temperature, and their relation to energy, entropy, and the physical properties of matter and radiation. The behavior of these quantities is governed by the four laws of thermodynamics which convey a quantitative description using measurable macroscopic physical quantities, but may be explained in terms of microscopic constituents by statistical mechanics. Thermodynamics applies to a wide variety of topics in science and engineering, especially physical chemistry, biochemistry, chemical engineering and mechanical engineering, but also in other complex fields such as meteorology.

Historically, thermodynamics developed out of a desire to increase the efficiency of early steam engines, particularly through the work of French physicist Nicolas Léonard Sadi Carnot (1824) who believed that engine efficiency was the key that could help France win the Napoleonic Wars.[1] Scots-Irish physicist Lord Kelvin was the first to formulate a concise definition of thermodynamics in 1854[2] which stated, "Thermo-dynamics is the subject of the relation of heat to forces acting between contiguous parts of bodies, and the relation of heat to electrical agency."

The initial application of thermodynamics to mechanical heat engines was quickly extended to the study of chemical compounds and chemical reactions. Chemical thermodynamics studies the nature of the role of entropy in the process of chemical reactions and has provided the bulk of expansion and knowledge of the field.[3][4][5][6][7][8][9][10][11] Other formulations of thermodynamics emerged. Statistical thermodynamics, or statistical mechanics, concerns itself with statistical predictions of the collective motion of particles from their microscopic behavior. In 1909, Constantin Carathéodory presented a purely mathematical approach in an axiomatic formulation, a description often referred to as geometrical thermodynamics.

## Introduction

A description of any thermodynamic system employs the four laws of thermodynamics that form an axiomatic basis. The first law specifies that energy can be transferred between physical systems as heat, as work, and with transfer of matter.[12] The second law defines the existence of a quantity called entropy, that describes the direction, thermodynamically, that a system can evolve and quantifies the state of order of a system and that can be used to quantify the useful work that can be extracted from the system.[13]

In thermodynamics, interactions between large ensembles of objects are studied and categorized. Central to this are the concepts of the thermodynamic system and its surroundings. A system is composed of particles, whose average motions define its properties, and those properties are in turn related to one another through equations of state. Properties can be combined to express internal energy and thermodynamic potentials, which are useful for determining conditions for equilibrium and spontaneous processes.

With these tools, thermodynamics can be used to describe how systems respond to changes in their environment. This can be applied to a wide variety of topics in science and engineering, such as engines, phase transitions, chemical reactions, transport phenomena, and even black holes. The results of thermodynamics are essential for other fields of physics and for chemistry, chemical engineering, corrosion engineering, aerospace engineering, mechanical engineering, cell biology, biomedical engineering, materials science, and economics, to name a few.[14][15]

This article is focused mainly on classical thermodynamics which primarily studies systems in thermodynamic equilibrium. Non-equilibrium thermodynamics is often treated as an extension of the classical treatment, but statistical mechanics has brought many advances to that field.

The thermodynamicists representative of the original eight founding schools of thermodynamics. The schools with the most-lasting effect in founding the modern versions of thermodynamics are the Berlin school, particularly as established in Rudolf Clausius's 1865 textbook The Mechanical Theory of Heat, the Vienna school, with the statistical mechanics of Ludwig Boltzmann, and the Gibbsian school at Yale University, American engineer Willard Gibbs' 1876 On the Equilibrium of Heterogeneous Substances launching chemical thermodynamics.[16]

## History

The history of thermodynamics as a scientific discipline generally begins with Otto von Guericke who, in 1650, built and designed the world's first vacuum pump and demonstrated a vacuum using his Magdeburg hemispheres. Guericke was driven to make a vacuum in order to disprove Aristotle's long-held supposition that 'nature abhors a vacuum'. Shortly after Guericke, the Anglo-Irish physicist and chemist Robert Boyle had learned of Guericke's designs and, in 1656, in coordination with English scientist Robert Hooke, built an air pump.[17] Using this pump, Boyle and Hooke noticed a correlation between pressure, temperature, and volume. In time, Boyle's Law was formulated, which states that pressure and volume are inversely proportional. Then, in 1679, based on these concepts, an associate of Boyle's named Denis Papin built a steam digester, which was a closed vessel with a tightly fitting lid that confined steam until a high pressure was generated.

Later designs implemented a steam release valve that kept the machine from exploding. By watching the valve rhythmically move up and down, Papin conceived of the idea of a piston and a cylinder engine. He did not, however, follow through with his design. Nevertheless, in 1697, based on Papin's designs, engineer Thomas Savery built the first engine, followed by Thomas Newcomen in 1712. Although these early engines were crude and inefficient, they attracted the attention of the leading scientists of the time.

The fundamental concepts of heat capacity and latent heat, which were necessary for the development of thermodynamics, were developed by Professor Joseph Black at the University of Glasgow, where James Watt was employed as an instrument maker. Black and Watt performed experiments together, but it was Watt who conceived the idea of the external condenser which resulted in a large increase in steam engine efficiency.[18] Drawing on all the previous work led Sadi Carnot, the "father of thermodynamics", to publish Reflections on the Motive Power of Fire (1824), a discourse on heat, power, energy and engine efficiency. The book outlined the basic energetic relations between the Carnot engine, the Carnot cycle, and motive power. It marked the start of thermodynamics as a modern science.[10]

The first thermodynamic textbook was written in 1859 by William Rankine, originally trained as a physicist and a civil and mechanical engineering professor at the University of Glasgow.[19] The first and second laws of thermodynamics emerged simultaneously in the 1850s, primarily out of the works of William Rankine, Rudolf Clausius, and William Thomson (Lord Kelvin). The foundations of statistical thermodynamics were set out by physicists such as James Clerk Maxwell, Ludwig Boltzmann, Max Planck, Rudolf Clausius and J. Willard Gibbs.

During the years 1873-76 the American mathematical physicist Josiah Willard Gibbs published a series of three papers, the most famous being On the Equilibrium of Heterogeneous Substances,[3] in which he showed how thermodynamic processes, including chemical reactions, could be graphically analyzed, by studying the energy, entropy, volume, temperature and pressure of the thermodynamic system in such a manner, one can determine if a process would occur spontaneously.[20] Also Pierre Duhem in the 19th century wrote about chemical thermodynamics.[4] During the early 20th century, chemists such as Gilbert N. Lewis, Merle Randall,[5] and E. A. Guggenheim[6][7] applied the mathematical methods of Gibbs to the analysis of chemical processes.

## Etymology

The etymology of thermodynamics has an intricate history.[21] It was first spelled in a hyphenated form as an adjective (thermo-dynamic) and from 1854 to 1868 as the noun thermo-dynamics to represent the science of generalized heat engines.[21]

American biophysicist Donald Haynie claims that thermodynamics was coined in 1840 from the Greek root therme, meaning "heat", and ? dynamis, meaning "power".[22]

Pierre Perrot claims that the term thermodynamics was coined by James Joule in 1858 to designate the science of relations between heat and power,[10] however, Joule never used that term, but used instead the term perfect thermo-dynamic engine in reference to Thomson's 1849[23] phraseology.[21]

By 1858, thermo-dynamics, as a functional term, was used in William Thomson's paper "An Account of Carnot's Theory of the Motive Power of Heat."[23]

## Branches of thermodynamics

The study of thermodynamical systems has developed into several related branches, each using a different fundamental model as a theoretical or experimental basis, or applying the principles to varying types of systems.

### Classical thermodynamics

Classical thermodynamics is the description of the states of thermodynamic systems at near-equilibrium, that uses macroscopic, measurable properties. It is used to model exchanges of energy, work and heat based on the laws of thermodynamics. The qualifier classical reflects the fact that it represents the first level of understanding of the subject as it developed in the 19th century and describes the changes of a system in terms of macroscopic empirical (large scale, and measurable) parameters. A microscopic interpretation of these concepts was later provided by the development of statistical mechanics.

### Statistical mechanics

Statistical mechanics, also known as statistical thermodynamics, emerged with the development of atomic and molecular theories in the late 19th century and early 20th century, and supplemented classical thermodynamics with an interpretation of the microscopic interactions between individual particles or quantum-mechanical states. This field relates the microscopic properties of individual atoms and molecules to the macroscopic, bulk properties of materials that can be observed on the human scale, thereby explaining classical thermodynamics as a natural result of statistics, classical mechanics, and quantum theory at the microscopic level.

### Chemical thermodynamics

Chemical thermodynamics is the study of the interrelation of energy with chemical reactions or with a physical change of state within the confines of the laws of thermodynamics. The primary objective of chemical thermodynamics is determining the spontaneity of a given transformation.[24]

### Equilibrium thermodynamics

Equilibrium thermodynamics is the study of transfers of matter and energy in systems or bodies that, by agencies in their surroundings, can be driven from one state of thermodynamic equilibrium to another. The term 'thermodynamic equilibrium' indicates a state of balance, in which all macroscopic flows are zero; in the case of the simplest systems or bodies, their intensive properties are homogeneous, and their pressures are perpendicular to their boundaries. In an equilibrium state there are no unbalanced potentials, or driving forces, between macroscopically distinct parts of the system. A central aim in equilibrium thermodynamics is: given a system in a well-defined initial equilibrium state, and given its surroundings, and given its constitutive walls, to calculate what will be the final equilibrium state of the system after a specified thermodynamic operation has changed its walls or surroundings.

### Non-equilibrium thermodynamics

Non-equilibrium thermodynamics is a branch of thermodynamics that deals with systems that are not in thermodynamic equilibrium. Most systems found in nature are not in thermodynamic equilibrium because they are not in stationary states, and are continuously and discontinuously subject to flux of matter and energy to and from other systems. The thermodynamic study of non-equilibrium systems requires more general concepts than are dealt with by equilibrium thermodynamics.[25] Many natural systems still today remain beyond the scope of currently known macroscopic thermodynamic methods.

## Laws of thermodynamics

Thermodynamics is principally based on a set of four laws which are universally valid when applied to systems that fall within the constraints implied by each. In the various theoretical descriptions of thermodynamics these laws may be expressed in seemingly differing forms, but the most prominent formulations are the following.

### Zeroth Law

The zeroth law of thermodynamics states: If two systems are each in thermal equilibrium with a third, they are also in thermal equilibrium with each other.

This statement implies that thermal equilibrium is an equivalence relation on the set of thermodynamic systems under consideration. Systems are said to be in equilibrium if the small, random exchanges between them (e.g. Brownian motion) do not lead to a net change in energy. This law is tacitly assumed in every measurement of temperature. Thus, if one seeks to decide whether two bodies are at the same temperature, it is not necessary to bring them into contact and measure any changes of their observable properties in time.[26] The law provides an empirical definition of temperature, and justification for the construction of practical thermometers.

The zeroth law was not initially recognized as a separate law of thermodynamics, as its basis in thermodynamical equilibrium was implied in the other laws. The first, second, and third laws had been explicitly stated already, and found common acceptance in the physics community before the importance of the zeroth law for the definition of temperature was realized. As it was impractical to renumber the other laws, it was named the zeroth law.

### First Law

The first law of thermodynamics states: In a process without transfer of matter, the change in internal energy, ${\displaystyle \Delta U}$, of a thermodynamic system is equal to the energy gained as heat, ${\displaystyle Q}$, less the thermodynamic work, ${\displaystyle W}$, done by the system on its surroundings.[27][nb 1]

${\displaystyle \Delta U=Q-W}$.

where ${\displaystyle \Delta U}$ denotes the change in the internal energy of a closed system (for which heat or work through the system boundary are possible, but matter transfer is not possible), ${\displaystyle Q}$ denotes the quantity of energy supplied to the system as heat, and ${\displaystyle W}$ denotes the amount of thermodynamic work done by the system on its surroundings. An equivalent statement is that perpetual motion machines of the first kind are impossible; work ${\displaystyle W}$ done by a system on its surrounding requires that the system's internal energy ${\displaystyle U}$ decrease or be consumed, so that the amount of internal energy lost by that work must be resupplied as heat ${\displaystyle Q}$ by an external energy source or as work by an external machine acting on the system (so that ${\displaystyle U}$ is recovered) to make the system work continuously.

For processes that include transfer of matter, a further statement is needed: With due account of the respective fiducial reference states of the systems, when two systems, which may be of different chemical compositions, initially separated only by an impermeable wall, and otherwise isolated, are combined into a new system by the thermodynamic operation of removal of the wall, then

${\displaystyle U_{0}=U_{1}+U_{2}}$,

where U0 denotes the internal energy of the combined system, and U1 and U2 denote the internal energies of the respective separated systems.

Adapted for thermodynamics, this law is an expression of the principle of conservation of energy, which states that energy can be transformed (changed from one form to another), but cannot be created or destroyed.[28]

Internal energy is a principal property of the thermodynamic state, while heat and work are modes of energy transfer by which a process may change this state. A change of internal energy of a system may be achieved by any combination of heat added or removed and work performed on or by the system. As a function of state, the internal energy does not depend on the manner, or on the path through intermediate steps, by which the system arrived at its state.

### Second Law

A traditional version of the second law of thermodynamics states: Heat does not spontaneously flow from a colder body to a hotter.

The second law refers to a system of matter and radiation, initially with inhomogeneities in temperature, pressure, chemical potential, and other intensive properties, that are due to internal 'constraints', or impermeable rigid walls, within it, or to externally imposed forces. The law observes that, when the system is isolated from the outside world and from those forces, there is a definite thermodynamic quantity, its entropy, that increases as the constraints are removed, eventually reaching a maximum value at thermodynamic equilibrium, when the inhomogeneities practically vanish. For systems that are initially far from thermodynamic equilibrium, though several have been proposed, there is known no general physical principle that determines the rates of approach to thermodynamic equilibrium, and thermodynamics does not deal with such rates. The many versions of the second law all express the irreversibility of such approach to thermodynamic equilibrium.

In macroscopic thermodynamics, the second law is a basic observation applicable to any actual thermodynamic process; in statistical thermodynamics, the second law is postulated to be a consequence of molecular chaos.

### Third Law

The third law of thermodynamics states: As the temperature of a system approaches absolute zero, all processes cease and the entropy of the system approaches a minimum value.

This law of thermodynamics is a statistical law of nature regarding entropy and the impossibility of reaching absolute zero of temperature. This law provides an absolute reference point for the determination of entropy. The entropy determined relative to this point is the absolute entropy. Alternate definitions include "the entropy of all systems and of all states of a system is smallest at absolute zero," or equivalently "it is impossible to reach the absolute zero of temperature by any finite number of processes".

Absolute zero, at which all activity would stop if it were possible to achieve, is -273.15 °C (degrees Celsius), or -459.67 °F (degrees Fahrenheit), or 0 K (kelvin), or 0° R (degrees Rankine).

## System models

A diagram of a generic thermodynamic system

An important concept in thermodynamics is the thermodynamic system, which is a precisely defined region of the universe under study. Everything in the universe except the system is called the surroundings. A system is separated from the remainder of the universe by a boundary which may be a physical or notional, but serve to confine the system to a finite volume. Segments of the boundary are often described as walls; they have respective defined 'permeabilities'. Transfers of energy as work, or as heat, or of matter, between the system and the surroundings, take place through the walls, according to their respective permeabilities.

Matter or energy that pass across the boundary so as to effect a change in the internal energy of the system need to be accounted for in the energy balance equation. The volume contained by the walls can be the region surrounding a single atom resonating energy, such as Max Planck defined in 1900; it can be a body of steam or air in a steam engine, such as Sadi Carnot defined in 1824. The system could also be just one nuclide (i.e. a system of quarks) as hypothesized in quantum thermodynamics. When a looser viewpoint is adopted, and the requirement of thermodynamic equilibrium is dropped, the system can be the body of a tropical cyclone, such as Kerry Emanuel theorized in 1986 in the field of atmospheric thermodynamics, or the event horizon of a black hole.

Boundaries are of four types: fixed, movable, real, and imaginary. For example, in an engine, a fixed boundary means the piston is locked at its position, within which a constant volume process might occur. If the piston is allowed to move that boundary is movable while the cylinder and cylinder head boundaries are fixed. For closed systems, boundaries are real while for open systems boundaries are often imaginary. In the case of a jet engine, a fixed imaginary boundary might be assumed at the intake of the engine, fixed boundaries along the surface of the case and a second fixed imaginary boundary across the exhaust nozzle.

Generally, thermodynamics distinguishes three classes of systems, defined in terms of what is allowed to cross their boundaries:

Interactions of thermodynamic systems
Type of system Mass flow Work Heat
Open
Closed N
Thermally isolated N N
Mechanically isolated N N
Isolated N N N

As time passes in an isolated system, internal differences of pressures, densities, and temperatures tend to even out. A system in which all equalizing processes have gone to completion is said to be in a state of thermodynamic equilibrium.

Once in thermodynamic equilibrium, a system's properties are, by definition, unchanging in time. Systems in equilibrium are much simpler and easier to understand than are systems which are not in equilibrium. Often, when analysing a dynamic thermodynamic process, the simplifying assumption is made that each intermediate state in the process is at equilibrium, producing thermodynamic processes which develop so slowly as to allow each intermediate step to be an equilibrium state and are said to be reversible processes.

## States and processes

When a system is at equilibrium under a given set of conditions, it is said to be in a definite thermodynamic state. The state of the system can be described by a number of state quantities that do not depend on the process by which the system arrived at its state. They are called intensive variables or extensive variables according to how they change when the size of the system changes. The properties of the system can be described by an equation of state which specifies the relationship between these variables. State may be thought of as the instantaneous quantitative description of a system with a set number of variables held constant.

A thermodynamic process may be defined as the energetic evolution of a thermodynamic system proceeding from an initial state to a final state. It can be described by process quantities. Typically, each thermodynamic process is distinguished from other processes in energetic character according to what parameters, such as temperature, pressure, or volume, etc., are held fixed; Furthermore, it is useful to group these processes into pairs, in which each variable held constant is one member of a conjugate pair.

Several commonly studied thermodynamic processes are:

## Instrumentation

There are two types of thermodynamic instruments, the meter and the reservoir. A thermodynamic meter is any device which measures any parameter of a thermodynamic system. In some cases, the thermodynamic parameter is actually defined in terms of an idealized measuring instrument. For example, the zeroth law states that if two bodies are in thermal equilibrium with a third body, they are also in thermal equilibrium with each other. This principle, as noted by James Maxwell in 1872, asserts that it is possible to measure temperature. An idealized thermometer is a sample of an ideal gas at constant pressure. From the ideal gas law pV=nRT, the volume of such a sample can be used as an indicator of temperature; in this manner it defines temperature. Although pressure is defined mechanically, a pressure-measuring device, called a barometer may also be constructed from a sample of an ideal gas held at a constant temperature. A calorimeter is a device which is used to measure and define the internal energy of a system.

A thermodynamic reservoir is a system which is so large that its state parameters are not appreciably altered when it is brought into contact with the system of interest. When the reservoir is brought into contact with the system, the system is brought into equilibrium with the reservoir. For example, a pressure reservoir is a system at a particular pressure, which imposes that pressure upon the system to which it is mechanically connected. The Earth's atmosphere is often used as a pressure reservoir. The ocean can act as temperature reservoir when used to cool power plants.

## Conjugate variables

The central concept of thermodynamics is that of energy, the ability to do work. By the First Law, the total energy of a system and its surroundings is conserved. Energy may be transferred into a system by heating, compression, or addition of matter, and extracted from a system by cooling, expansion, or extraction of matter. In mechanics, for example, energy transfer equals the product of the force applied to a body and the resulting displacement.

Conjugate variables are pairs of thermodynamic concepts, with the first being akin to a "force" applied to some thermodynamic system, the second being akin to the resulting "displacement," and the product of the two equaling the amount of energy transferred. The common conjugate variables are:

## Potentials

Thermodynamic potentials are different quantitative measures of the stored energy in a system. Potentials are used to measure the energy changes in systems as they evolve from an initial state to a final state. The potential used depends on the constraints of the system, such as constant temperature or pressure. For example, the Helmholtz and Gibbs energies are the energies available in a system to do useful work when the temperature and volume or the pressure and temperature are fixed, respectively.

The five most well known potentials are:

Name Symbol Formula Natural variables
Internal energy ${\displaystyle U}$ ${\displaystyle \int \left(T\,dS-p\,dV+\sum _{i}\mu _{i}dN_{i}\right)}$ ${\displaystyle S,V,\{N_{i}\}}$
Helmholtz free energy ${\displaystyle F}$ ${\displaystyle U-TS}$ ${\displaystyle T,V,\{N_{i}\}}$
Enthalpy ${\displaystyle H}$ ${\displaystyle U+pV}$ ${\displaystyle S,p,\{N_{i}\}}$
Gibbs free energy ${\displaystyle G}$ ${\displaystyle U+pV-TS}$ ${\displaystyle T,p,\{N_{i}\}}$
Landau potential, or
grand potential
${\displaystyle \Omega }$, ${\displaystyle \Phi _{\text{G}}}$ ${\displaystyle U-TS-}$${\displaystyle \sum _{i}\,}$${\displaystyle \mu _{i}N_{i}}$ ${\displaystyle T,V,\{\mu _{i}\}}$

where ${\displaystyle T}$ is the temperature, ${\displaystyle S}$ the entropy, ${\displaystyle p}$ the pressure, ${\displaystyle V}$ the volume, ${\displaystyle \mu }$ the chemical potential, ${\displaystyle N}$ the number of particles in the system, and ${\displaystyle i}$ is the count of particles types in the system.

Thermodynamic potentials can be derived from the energy balance equation applied to a thermodynamic system. Other thermodynamic potentials can also be obtained through Legendre transformation.

## Notes

1. ^ The sign convention (Q is heat supplied to the system as, W is work done by the system) is that of Rudolf Clausius. The opposite sign convention is customary in chemical thermodynamics.

## References

1. ^ Clausius, Rudolf (1850). On the Motive Power of Heat, and on the Laws which can be deduced from it for the Theory of Heat. Poggendorff's Annalen der Physik, LXXIX (Dover Reprint). ISBN 978-0-486-59065-3.
2. ^ William Thomson, LL.D. D.C.L., F.R.S. (1882). Mathematical and Physical Papers. 1. London, Cambridge: C.J. Clay, M.A. & Son, Cambridge University Press. p. 232. Archived from the original on 18 April 2021. Retrieved 2020.CS1 maint: multiple names: authors list (link)
3. ^ a b Gibbs, Willard, J. (1874-1878). Transactions of the Connecticut Academy of Arts and Sciences. III. New Haven. pp. 108-248, 343-524.CS1 maint: multiple names: authors list (link)
4. ^ a b Duhem, P.M.M. (1886). Le Potential Thermodynamique et ses Applications, Hermann, Paris.
5. ^ a b Lewis, Gilbert N.; Randall, Merle (1923). Thermodynamics and the Free Energy of Chemical Substances. McGraw-Hill Book Co. Inc.
6. ^ a b Guggenheim, E.A. (1933). Modern Thermodynamics by the Methods of J.W. Gibbs, Methuen, London.
7. ^ a b Guggenheim, E.A. (1949/1967). Thermodynamics. An Advanced Treatment for Chemists and Physicists, 1st edition 1949, 5th edition 1967, North-Holland, Amsterdam.
8. ^ Ilya Prigogine, I. & Defay, R., translated by D.H. Everett (1954). Chemical Thermodynamics. Longmans, Green & Co., London. Includes classical non-equilibrium thermodynamics.CS1 maint: multiple names: authors list (link)
9. ^ Enrico Fermi (1956). Thermodynamics. Courier Dover Publications. p. ix. ISBN 978-0486603612. OCLC 230763036. Archived from the original on 18 April 2021. Retrieved 2020.
10. ^ a b c Perrot, Pierre (1998). A to Z of Thermodynamics. Oxford University Press. ISBN 978-0-19-856552-9. OCLC 123283342.
11. ^ Clark, John, O.E. (2004). The Essential Dictionary of Science. Barnes & Noble Books. ISBN 978-0-7607-4616-5. OCLC 58732844.CS1 maint: multiple names: authors list (link)
12. ^ Van Ness, H.C. (1983) [1969]. Understanding Thermodynamics. Dover Publications, Inc. ISBN 9780486632773. OCLC 8846081.
13. ^ Dugdale, J.S. (1998). Entropy and its Physical Meaning. Taylor and Francis. ISBN 978-0-7484-0569-5. OCLC 36457809.
14. ^ Smith, J.M.; Van Ness, H.C.; Abbott, M.M. (2005). Introduction to Chemical Engineering Thermodynamics (7th ed.). p. 584. Bibcode:1950JChEd..27..584S. ISBN 978-0-07-310445-4. OCLC 56491111.
15. ^ Haynie, Donald, T. (2001). Biological Thermodynamics. Cambridge University Press. ISBN 978-0-521-79549-4. OCLC 43993556.CS1 maint: multiple names: authors list (link)
16. ^ Schools of thermodynamics Archived 7 December 2017 at the Wayback Machine - EoHT.info.
17. ^ Partington, J.R. (1989). A Short History of Chemistry. Dover. OCLC 19353301.
18. ^ The Newcomen engine was improved from 1711 until Watt's work, making the efficiency comparison subject to qualification, but the increase from the 1865 version was on the order of 100%.
19. ^ Cengel, Yunus A.; Boles, Michael A. (2005). Thermodynamics - an Engineering Approach. McGraw-Hill. ISBN 978-0-07-310768-4.
20. ^ Gibbs, Willard (1993). The Scientific Papers of J. Willard Gibbs, Volume One: Thermodynamics. Ox Bow Press. ISBN 978-0-918024-77-0. OCLC 27974820.
21. ^ a b c "Thermodynamics (etymology)". EoHT.info. Archived from the original on 25 May 2010. Retrieved 2010.
22. ^ Donald T. Haynie (2008). Biological Thermodynamics (2 ed.). Cambridge University Press. p. 26.
23. ^ a b Kelvin, William T. (1849) "An Account of Carnot's Theory of the Motive Power of Heat - with Numerical Results Deduced from Regnault's Experiments on Steam." Transactions of the Edinburg Royal Society, XVI. January 2.Scanned Copy Archived 24 July 2017 at the Wayback Machine
24. ^ Klotz, Irving (2008). Chemical Thermodynamics: Basic Theory and Methods. Hoboken, New Jersey: John Wiley & Sons, Inc. p. 4. ISBN 978-0-471-78015-1.
25. ^ Pokrovskii, Vladimir (2020). Thermodynamics of Complex Systems: Principles and applications. IOP Publishing, Bristol, UK.
26. ^ Moran, Michael J. and Howard N. Shapiro, 2008. Fundamentals of Engineering Thermodynamics. 6th ed. Wiley and Sons: 16.
27. ^ Bailyn, M. (1994). A Survey of Thermodynamics, American Institute of Physics, AIP Press, Woodbury NY, ISBN 0883187973, p. 79.
28. ^ Callen, H.B. (1960/1985).Thermodynamics and an Introduction to Thermostatistics, second edition, John Wiley & Sons, Hoboken NY, ISBN 9780471862567, pp. 11-13.

• Goldstein, Martin & Inge F. (1993). The Refrigerator and the Universe. Harvard University Press. ISBN 978-0-674-75325-9. OCLC 32826343. A nontechnical introduction, good on historical and interpretive matters.
• Kazakov, Andrei; Muzny, Chris D.; Chirico, Robert D.; Diky, Vladimir V.; Frenkel, Michael (2008). "Web Thermo Tables - an On-Line Version of the TRC Thermodynamic Tables". Journal of Research of the National Institute of Standards and Technology. 113 (4): 209-220. doi:10.6028/jres.113.016. ISSN 1044-677X. PMC 4651616. PMID 27096122.
• Gibbs J.W. (1928). The Collected Works of J. Willard Gibbs Thermodynamics. New York: Longmans, Green and Co. Vol. 1, pp. 55-349.
• Guggenheim E.A. (1933). Modern thermodynamics by the methods of Willard Gibbs. London: Methuen & co. ltd.
• Denbigh K. (1981). The Principles of Chemical Equilibrium: With Applications in Chemistry and Chemical Engineering. London: Cambridge University Press.
• Stull, D.R., Westrum Jr., E.F. and Sinke, G.C. (1969). The Chemical Thermodynamics of Organic Compounds. London: John Wiley and Sons, Inc.CS1 maint: multiple names: authors list (link)
• Bazarov I.P. (2010). Thermodynamics: Textbook. St. Petersburg: Lan publishing house. p. 384. ISBN 978-5-8114-1003-3. 5th ed. (in Russian)
• Bawendi Moungi G., Alberty Robert A. and Silbey Robert J. (2004). Physical Chemistry. J. Wiley & Sons, Incorporated.
• Alberty Robert A. (2003). Thermodynamics of Biochemical Reactions. Wiley-Interscience.
• Alberty Robert A. (2006). Biochemical Thermodynamics: Applications of Mathematica. Methods of Biochemical Analysis. 48. John Wiley & Sons, Inc. pp. 1-458. ISBN 978-0-471-75798-6. PMID 16878778.
• Dill Ken A., Bromberg Sarina (2011). Molecular Driving Forces: Statistical Thermodynamics in Biology, Chemistry, Physics, and Nanoscience. Garland Science. ISBN 978-0-8153-4430-8.
• M. Scott Shell (2015). Thermodynamics and Statistical Mechanics: An Integrated Approach. Cambridge University Press. ISBN 978-1107656789.
• Douglas E. Barrick (2018). Biomolecular Thermodynamics: From Theory to Applications. CRC Press. ISBN 978-1-4398-0019-5.

The following titles are more technical:


text:
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# 8.1: Hypothesis Testing and the P-Value

Difficulty Level: At Grade Created by: CK-12

## Learning Objectives

• Develop null and alternative hypotheses to test for a given situation.
• Understand the critical regions of a graph for single- and two-tailed hypothesis tests.
• Calculate a test statistic to evaluate a hypothesis.
• Test the probability of an event using the \begin{align*}P\end{align*}-value.
• Understand Type I and Type II errors.
• Calculate the power of a test.

## Introduction

In this chapter we will explore hypothesis testing, which involves making educated guesses about a population based on a sample drawn from the population. Most times, hypothesis testing involves making guesses about the difference between the hypothesized value of the mean of an overall population and that of the sample. This is often used in statistics to analyze the likelihood that a population has certain characteristics. For example, we can use hypothesis testing to analyze if a senior class has a particular average SAT score or if a prescription drug has a certain proportion of the active ingredient.

A hypothesis is simply an educated guess about a characteristic or set of facts. When performing statistical analyses, our hypotheses provide the general framework of what we are testing and how to perform the test. These tests are never certain and we can never prove or disprove hypotheses with statistics, but the outcomes of these tests provide information that either helps support or refute the hypothesis itself.

In this section we will learn about the different types of hypothesis testing, how to develop hypotheses, how to calculate statistics to help support or refute the hypotheses and understand the errors associated with hypothesis testing.

## Developing Null and Alternative Hypotheses

As mentioned in the introduction, hypothesis testing involves testing the difference between a hypothesized value of the mean of an overall population and the mean calculated from a sample. In hypothesis testing, we are essentially determining the magnitude of the difference between the mean of the sample and they hypothesized mean of the population. If the difference is very large, we reject our hypothesis about the population. If the difference is very small, we do not. Below is an overview of this process.

In statistics, the hypothesis to be tested is called the null hypothesis and given the symbol \begin{align*}H_{0}\end{align*}. The null hypothesis states that there is no relationship or no difference between an accepted population mean and a sample mean. So finding a significant result means refuting the null hypothesis, showing that the true population mean is likely to be closer to the sample mean. We would calculate the mean of the sample and generalize these findings to the overall population. For example, if we were to test the hypothesis that the seniors had a mean SAT score of \begin{align*}1,100,\end{align*} our null hypothesis would be that the SAT score would be equal to \begin{align*}1,100\end{align*} or:

\begin{align*}H_{0}: \mu=1100\end{align*}

where:

\begin{align*}H_{0} = \end{align*} symbol for null hypothesis

\begin{align*}\mu =\end{align*} population mean

\begin{align*}1,100 =\end{align*} value to be tested

We test the null hypothesis against an alternative hypothesis, which is given the symbol \begin{align*}H_{a}\end{align*} and includes the outcomes not covered by the null hypothesis. Basically, the alternative hypothesis states that there is a difference between the hypothesized population mean and the sample mean. The alternative hypothesis can be supported only by rejecting the null hypothesis. In our example above about the SAT scores of graduating seniors, our alternative hypothesis would state that there is a difference between the null and alternative hypotheses or:

\begin{align*}H_{a}: \mu\neq 1100\end{align*}

Let’s take a look at a couple of examples and develop a few null and alternative hypotheses.

Example:

We have a medicine that is being manufactured and each pill is supposed to have \begin{align*}14\;\mathrm{milligrams}\end{align*} of the active ingredient. What are our null and alternative hypotheses?

Solution:

\begin{align*}& H_{0}: \mu=14\\ & H_{a}: \mu\neq14 \end{align*}

Our null hypothesis states that the population has a mean equal to \begin{align*}14\;\mathrm{milligrams.}\end{align*} Our alternative hypothesis states that the population has a mean that is different than \begin{align*}14\;\mathrm{milligrams.}\end{align*}

Example:

The school principal wants to test if it is true what teachers say -- that high school juniors use the computer an average \begin{align*}3.2\;\mathrm{hours}\end{align*} a day. What are our null and alternative hypotheses?

Solution:

\begin{align*}& H_{0}: \mu=3.2 \\ & H_{a}: \mu\neq 3.2\end{align*}

Our null hypothesis states that the population has a mean equal to \begin{align*}3.2\;\mathrm{hours.}\end{align*} Our alternative hypothesis states that the population has a mean that differs from \begin{align*}3.2\;\mathrm{hours.}\end{align*}

## Deciding Whether to Reject the Null Hypothesis: Single and Two-Tailed Hypothesis Tests

When a hypothesis is tested, a statistician must decide on how much evidence is necessary in order to reject the null hypothesis. For example, if the null hypothesis is that the average height of a population is \begin{align*}64\;\mathrm{inches,}\end{align*} a statistician wouldn't measure one person who is \begin{align*}66\;\mathrm{inches}\end{align*} and reject the hypothesis based on that one trial. It is too likely that the discrepancy was merely due to chance. Statisticians first choose a level of significance or alpha \begin{align*}(\alpha)\end{align*} level, which is an event probability below which discrepancies from the null hypothesis are deemed significant. The most frequently used levels of significance are \begin{align*}0.05\end{align*} and \begin{align*}0.01.\end{align*} In other words, these levels mean that when we make the decision to reject the null hypothesis, we are correct \begin{align*}95\end{align*} or \begin{align*}99\;\mathrm{percent}\end{align*} of the time. The areas outside of these levels of significance are called the critical regions. When choosing the level of significance, we need to consider the consequences of rejecting or failing to reject the null hypothesis. If there is the potential for health consequences (as in the case of active ingredients in prescription medications) or great cost (as in the case of manufacturing machine parts), we should use a more ‘conservative’ critical region with levels of significance such as \begin{align*}.005\end{align*} or \begin{align*}.001.\end{align*}

When determining the critical regions for a two-tailed hypothesis test, the level of significance represents the extreme areas under the normal density curve. We call this a two-tailed hypothesis test because the critical region is located in both ends of the distribution. For example, if there was a significance level of \begin{align*}0.95,\end{align*} the critical region would be the most extreme \begin{align*}5\;\mathrm{percent}\end{align*} under the curve with \begin{align*}2.5\;\mathrm{percent}\end{align*} on each tail of the distribution.

Therefore, if the mean from sample taken from the population falls within these critical regions, we would conclude that there was too much of a difference and we would reject the null hypothesis. However, if the mean from the sample falls in the middle of the distribution (in between the critical regions) we would fail to reject the null hypothesis.

We calculate the critical region for the single-tail hypothesis test a bit differently. We would use a single-tail hypothesis test when the direction of the results is anticipated or we are only interested in one direction of the results. For example, a single-tail hypothesis test may be used when evaluating whether or not to adopt a new textbook. We would only decide to adopt the textbook if it improved student achievement relative to the old textbook. A single-tail hypothesis simply states that the mean is greater or less than the hypothesized value.

When performing a single-tail hypothesis test, our alternative hypothesis looks a bit different. When developing the alternative hypothesis in a single-tail hypothesis test we would use the symbols of greater than or less than. Using our example about SAT scores of graduating seniors, our null and alternative hypothesis could look something like:

\begin{align*}& H_{0}: \mu=1100 \\ & H_{a}:\mu\neq 1100\end{align*}

In this scenario, our null hypothesis states that the mean SAT scores would be equal to \begin{align*}1,100\end{align*} while the alternate hypothesis states that the SAT scores would be greater than \begin{align*}1,100.\end{align*} A single-tail hypothesis test also means that we have only one critical region because we put the entire region of rejection into just one side of the distribution. When the alternative hypothesis is that the sample mean is greater, the critical region is on the right side of the distribution. When the alternative hypothesis is that the sample is smaller, the critical region is on the left side of the distribution (see below).

To calculate the critical regions, we must first find the critical values or the cut-offs where the critical regions start. To find these values, we use the critical values found specified by the \begin{align*}z\end{align*}-distribution. These values can be found in a table that lists the areas of each of the tails under a normal distribution. Using this table, we find that for a \begin{align*}0.05\end{align*} significance level, our critical values would fall at \begin{align*}1.96\end{align*} standard errors above and below the mean. For a \begin{align*}0.01\end{align*} significance level, our critical values would fall at \begin{align*}2.57\end{align*} standard errors above and below the mean. Using the \begin{align*}z\end{align*}-distribution we can find critical values (as specified by standard \begin{align*}z\end{align*} scores) for any level of significance for either single- or two-tailed hypothesis tests.

Example:

Use the \begin{align*}z\end{align*}-distribution table to determine the critical value for a single-tailed hypothesis test with a \begin{align*}0.05\end{align*} significance level.

Solution:

Using the \begin{align*}z\end{align*}-distribution table, we find that a significance level of \begin{align*}0.05\end{align*} corresponds with a critical value of \begin{align*}1.645.\end{align*}

## Calculating the Test Statistic

Before evaluating our hypotheses by determining the critical region and calculating the test statistic, we need to first:

1. Confirm that the distribution is normal.
2. Determine the hypothesized mean \begin{align*}(\mu)\end{align*} of the distribution.
3. If we don’t have the population variance, we will need to calculate the standard deviation of the sample so that we can calculate the standard error of the mean \begin{align*}(\sigma_X)\end{align*}.

Remember that since we have a random sample from the population, we do not expect the sample mean to be exactly equal to the hypothesized value of the population mean. Therefore, the question really is: “How different can the observed sample mean be from the hypothesized mean before rejecting the null hypothesis?” Or, in other words, “If the null hypothesis is true, is it likely that we will obtain such an observed sample mean?” We use our critical values taken from the \begin{align*}z\end{align*}-distribution to determine those cutoffs.

To evaluate the sample mean against the hypothesized population mean, we use the concept of \begin{align*}z\end{align*} -scores to determine how different the two means are from each other. As we learned in previous lessons, the \begin{align*}z\end{align*}-score is calculated by using the formula:

\begin{align*}z = \frac {(\bar {X} - \mu )}{\sigma_X}\end{align*}

where:

\begin{align*}z =\end{align*} standardized score

\begin{align*}\bar {X}=\end{align*} sample mean

\begin{align*}\mu =\end{align*} hypothesized population mean

\begin{align*}\sigma_X =\end{align*} standard error?. If we do not have the population variance, we can estimate the deviation of the samples from the true population mean by dividing the standard deviation by the square root of the number of observations \begin{align*}\left ( \frac{\sigma} {\sqrt {n}}\right )\end{align*}.

Once we calculate the \begin{align*}z\end{align*}-score, we can make a decision about whether to reject or to fail to reject the null hypothesis based on the critical values.

Let’s calculate the test statistic for several different scenarios.

Example:

College A has an average SAT score of \begin{align*}1,500.\end{align*} From a random sample of \begin{align*}125\end{align*} freshman psychology students we find the average SAT score to be \begin{align*}1,450\end{align*} with a standard deviation of \begin{align*}100.\end{align*} We want to know if these freshman psychology students are representative of the overall population. What are our hypotheses and the test statistic?

Solution:

Let’s first develop our null and alternative hypotheses:

\begin{align*}& H_{0}: \mu=1500 \\ & H_{a}: \mu\neq 1500\end{align*}

Our standard \begin{align*}z\end{align*}-score for the sample of freshman psychology students would be:

\begin{align*}z = \frac{\bar {X} - \mu} {\sigma_x} = \frac{1450 -1500} {100/\sqrt{125}} \approx -5.59\end{align*}

Example:

A farmer is trying out a planting technique that he hopes will increase the yield on his pea plants. Over the last \begin{align*}5\;\mathrm{years,}\end{align*} the average number of pods on one of his pea plants was \begin{align*}145\;\mathrm{pods}\end{align*} with a standard deviation of \begin{align*}100\;\mathrm{pods.}\end{align*} This year, after trying his new planting technique, he takes a random sample of his plants and finds the average number of pods to be \begin{align*}147.\end{align*} He wonders whether or not this is a statistically significant increase. What is his hypotheses and the test statistic?

Solution:

First, we develop our null and alternative hypotheses:

\begin{align*}H_{0}:\mu=145\end{align*}

Let’s calculate the test statistic for several different scenarios.

Example:

\begin{align*}H_{a}: \mu>145\end{align*}

This alternative hypothesis is \begin{align*}>\end{align*} since we are only concerned with the pod gain which translates to above the mean.

Next, we calculate the standard \begin{align*}z\end{align*}-score for the sample of pea plants.

\begin{align*}z = \frac{\bar {X}-\mu} {\sigma_X} = \frac{147-145} {100/\sqrt {144}} = 0.24\end{align*}

In the following lessons, we will use these standard \begin{align*}z\end{align*}-scores and the critical regions to evaluate the null and the alternative hypotheses.

## Testing the P-Value of an Event

We can also evaluate a hypothesis by testing the probability, or the P-value, of an event occurring. When we assume that we have normal distributions, we can determine approximately where on the normal distribution that the sample mean will fall. When we know where it falls, we can determine the probability of obtaining a sample value either greater or smaller than the mean by using the \begin{align*}z\end{align*}-score.

Let’s use the example about the pea farmer. As we mentioned, the farmer is wondering if the number of pea pods per plant has gone up with his new planting technique and finds that out of a sample of \begin{align*}144\;\mathrm{peas}\end{align*} there is an average number of \begin{align*}147\;\mathrm{pods}\end{align*} per plant (compared to a previous average of \begin{align*}145\;\mathrm{pods}\end{align*}). But the farmer is really hoping that some plants have a more dramatic yield increase. What is the probability of a plant having a much higher yield of over \begin{align*}155\;\mathrm{pea\ pods}\end{align*}?

To find this probability, first find the \begin{align*}z\end{align*}-score for the hypothesized sample mean using the formula that we learned in the section above. Therefore, a \begin{align*}z\end{align*}-score for a sample of plants with \begin{align*}155\;\mathrm{pods}\end{align*} would be:

\begin{align*}z = \frac {\bar {X}-\mu}{\sigma_X} = \frac {155-145}{100 /\sqrt {144}} = 1.20\end{align*}

Using the \begin{align*}z\end{align*}-score distribution, we find that the area beyond a \begin{align*}z\end{align*}-score of \begin{align*}1.20\end{align*} is equal to \begin{align*}.1151.\end{align*} This means that there is \begin{align*}.1151\end{align*} or \begin{align*}11.5 \%\end{align*} chance that a pea plant will produce over \begin{align*}155\;\mathrm{pods.}\end{align*}

## Type I and Type II Errors

When we decide to reject or not reject the null hypothesis, we have four possible scenarios:

1. A true hypothesis is rejected.
2. A true hypothesis is not rejected.
3. A false hypothesis is not rejected.
4. A false hypothesis is rejected.

If a hypothesis is true and we do not reject it (Option 2) or if a false hypothesis is rejected (Option 4), we have made the correct decision. But if we reject a true hypothesis (Option 1) or a false hypothesis is not rejected (Option 3) we have made an error. Overall, one type of error is not necessarily more serious than the other. Which type is more serious depends on the specific research situation, but ideally both types of errors should be minimized during the analysis.

The Four Possible Outcomes in Hypothesis Testing
Decision Made Null Hypothesis is True Null Hypothesis is False
Reject Null Hypothesis Type I Error Correct Decision
Do not Reject Null Hypothesis Correct Decision Type II Error

The general approach to hypothesis testing focuses on the Type I error: rejecting the null hypothesis when it may be true. The level of significance, also known as the alpha level, is defined as the probability of making a Type I error when testing a null hypothesis. For example, at the \begin{align*}0.05\end{align*} level, we know that the decision to reject the hypothesis may be incorrect \begin{align*}5\;\mathrm{percent}\end{align*} of the time.

Calculating the probability of making a Type II error (?) is not as straightforward as calculating a Type I error. The probability of making a Type II error can only be determined when values have been specified for both the alternative hypothesis and the null hypothesis. Once the value for the alternative hypothesis has been specified, it is possible to determine the probability of making a correct decision (1- ?). This quantity, 1- ?, is called the power of the test and is discussed in the next section.

As mentioned, our goal is to minimize the potential of both Type I and Type II errors. However, there is a relationship between these two types of errors. As the level of significance or alpha level (?) increases, the probability of making a Type II error (?) decreases and vice versa. While ? is under our direct control, ? is not. We will look at this relationship a bit more in depth in the next section.

Often we establish the alpha level based on the severity of the consequences of making a Type I error. If the consequences are not that serious, we could set an alpha level at \begin{align*}0.10\end{align*} or \begin{align*}0.20.\end{align*} However, in a field like medical research we would set the alpha level very low (at \begin{align*}0.001\end{align*} for example) if there was potential bodily harm to patients. We can also attempt minimize the Type II errors by setting higher alpha levels in situations that do not have grave or costly consequences.

## Calculating the Power of a Test

The power of a test is defined as the probability of rejecting the null hypothesis when it is false (making the correct decision). Obviously, we want to maximize this power if we are concerned about making Type II errors. To determine the power of the test, there must be a specified value for the alternative hypothesis which is specified much in the same way as we specify the value in the null hypothesis. For example, suppose that a doctor is concerned about making a Type II error only if the active ingredient in the new medication is less than \begin{align*}3\;\mathrm{milligrams}\end{align*} higher than what was specified in the null hypothesis (say, \begin{align*}250\;\mathrm{milligrams}\end{align*} with a sample of \begin{align*}200\end{align*} and a standard deviation of \begin{align*}50\end{align*}). Now we have values for both the null and the alternative hypotheses.

\begin{align*}& H_{0}: \mu=250 \\ & H_{a}: \mu=253\end{align*}

By specifying a value for the alternative hypothesis, we have selected one of the many values for \begin{align*}H_{a}\end{align*}. In determining the power of the test, we must assume that \begin{align*}H_a\end{align*} is true and determine whether we would correctly reject the null hypothesis. In other words, we want to determine the power of our test for detecting this difference. In this example, we may choose a certain dosage if there were medical repercussions above that level.

We want to find the area under the curve that is associated with making a Type II error. In the example above, this means that we need to find the power that the test has for detecting this difference. Calculating the exact value for the power of the test requires determining the area above the critical value set up to test the null hypothesis when it is re-centered around the alternative hypothesis. Say that we have an alpha level of \begin{align*}.05\end{align*} – we would then have a critical value of \begin{align*}1.64\end{align*} for the single-tailed test which would have a value of:

\begin{align*}z & = \frac {\bar X - \mu}{\sigma_X} \\ 1.64 & = \frac {\bar {X}-250}{50/\sqrt {200}} \\ \bar {X} & = 1.64 \left (\frac{50} {\sqrt{200}}\right ) + 250 \approx 255.8\end{align*}

Now, with a new mean set at the alternative hypothesis \begin{align*}(H_a: \mu=253)\end{align*} we want to find the value of the critical score \begin{align*}(255.8)\end{align*} when centered around this score. Therefore, we can figure that:

\begin{align*}z = \frac {\bar X - \mu}{\sigma_X} = \frac {255.8-253}{3.54} \approx 0.79 \end{align*}

Using the standard \begin{align*}z\end{align*} distribution we find that the area to the right of a \begin{align*}z\end{align*}-score of \begin{align*}.79\end{align*} is \begin{align*}.2148.\end{align*} This means that since we assumed the alternative hypothesis to be true, there is only a \begin{align*}21.5 \%\end{align*} chance of rejecting the null hypothesis. The power of this test is about \begin{align*}0.215.\end{align*} In other words, this test of the null hypothesis is not very powerful and has only a \begin{align*}0.215\end{align*} probability of detecting the real difference between the means.

There are several things that affect the power of a test including:

• Whether the alternative hypothesis is a single-tailed or two-tailed test.
• The level of significance \begin{align*}(\alpha)\end{align*}.
• The sample size.

## Lesson Summary

1. Hypothesis testing involves making educated guesses about a population based on a sample drawn from the population. We generate null and alternative hypotheses based on the mean of the population to test these guesses.
2. We establish critical regions based on level of significance or alpha \begin{align*}(\alpha)\end{align*} levels. If the value of the test statistic falls in these critical regions, we are able to reject it.
3. To evaluate the sample mean against the hypothesized population mean, we use the concept of \begin{align*}z\end{align*}-scores to determine how different the two means are.
4. When we make a decision about a hypothesis, there are four different outcome and possibilities and two different types of errors. A Type I error is when we reject the null hypothesis when it is true and a Type II error is when we do not reject the null hypothesis, even when it is false.
5. The power of a test is defined as the probability of rejecting the null hypothesis when it is false (in other words, making the correct decision). We determine the power of a test by assigning a value to the alternative hypothesis and using the \begin{align*}z\end{align*}-score to calculate the probability of making a Type II error.

## Review Questions

1. If the difference between the hypothesized population mean and the mean of the sample is large, we ___ the null hypothesis. If the difference between the hypothesized population mean and the mean of the sample is small, we ___ the null hypothesis.
2. At the Chrysler manufacturing plant, there is a part that is supposed to weigh precisely \begin{align*}19\;\mathrm{pounds.}\end{align*} The engineers take a sample of parts and want to know if they meet the weight specifications. What are our null and alternative hypotheses?
3. In a hypothesis test, if difference between the sample mean and the hypothesized mean divided by the standard error falls in the middle of the distribution and in between the critical values, we ___ the null hypothesis. If this number falls in the critical regions and beyond the critical values, we ___ the null hypothesis.
4. Use the \begin{align*}z\end{align*}-distribution table to determine the critical value for a single-tailed hypothesis test with a \begin{align*}0.01\end{align*} significance level.
5. Sacramento County high school seniors have an average SAT score of \begin{align*}1,020.\end{align*} From a random sample of \begin{align*}144\end{align*} Sacramento High School students we find the average SAT score to be \begin{align*}1,100\end{align*} with a standard deviation of \begin{align*}144.\end{align*} We want to know if these high school students are representative of the overall population. What are our hypotheses and the test statistic?
6. During hypothesis testing, we use the \begin{align*}P\end{align*}-value to predict the ___ of an event occurring.
7. A survey shows that California teenagers have an average of \begin{align*}\ 500\end{align*} in savings \begin{align*}(\mathrm{standard\ error} = 100)\end{align*}. What is the probability that a randomly selected teenager will have savings greater than \begin{align*}\ 520\end{align*}?
8. Please fill in the types of errors missing from the table below:
Decision Made Null Hypothesis is True Null Hypothesis is False
Reject Null Hypothesis (1) ___ Correct Decision
Do not Reject Null Hypothesis Correct Decision (2) ___
1. The __ is defined as the probability of rejecting the null hypothesis when it is false (making the correct decision). We want to maximize__if we are concerned about making Type II errors.
2. The Governor’s economic committee is investigating average salaries of recent college graduates in California. They decide to test the null hypothesis that the average salary is \begin{align*}\ 24,500\end{align*} (standard deviation is \begin{align*}\ 4,800\end{align*}) and is concerned with making a Type II error only if the average salary is less than \begin{align*}\ 25,100.\end{align*} \begin{align*}(H_{a}: \mu=\25,100)\end{align*}. For an \begin{align*}\alpha =.05\end{align*} and a sample of \begin{align*}144,\end{align*} determine the power of a one-tailed test.

1. Reject, Fail to Reject
2. \begin{align*}H_{0}: \mu =19\end{align*}, \begin{align*}H_{a}: \mu\neq 19\end{align*}
3. Fail to Reject, Reject
4. \begin{align*}Z = 2.325\end{align*}
5. \begin{align*}H_{0}: \mu=1020, H_{a}:\mu\neq 1020, Z = 6.67\end{align*}
6. Probability
7. Area beyond a \begin{align*}z\end{align*}-score of \begin{align*}0.20 = .4207.\end{align*} Therefore, there is a probability of \begin{align*}42.07 \%\end{align*} that a teenager will have savings greater than \begin{align*}\ 520.\end{align*}
8. Type I error, Type II error
9. Power of the Test
10. \begin{align*}0.44\end{align*}

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes

Show Hide Details
Description
Tags:
Subjects:

format: plain


text:
##### Personal tools
•
You are here: Home Linear Minimum Mean-Square Error Filtering

# Linear Minimum Mean-Square Error Filtering

##### Document Actions

Background  ::  Filtering

## Background

Recall that for random variable and with finite variance, the MSE is minimized by . That is, the best estimate of using a measured value of is to find the conditional average of . One aspect of this estimate is that:

The error is orthogonal to the data.
More precisely, the error is orthogonal to and to every function of :

for all measurable functions . We will assume that .

We want to show that minimizes if and only if (orthogonality), for all measurable such that .

Conversely, suppose for some , . Consider the estimate

where

Then

Suppose now we are given two random processes and that are statistically related (that is, not independent). Suppose, to begin, that . Suppose we observe over the interval , and based on the information gained we want to estimate for some fixed as a function of . That is, we form

for some functional mapping the function to real numbers.

If : We say that the operation of the function is smoothing .

If : We way that the operation of the function is filtering .

If : We way that the operation of the function is prediction .

The error in the estimate is . The mean-squared error is .

Fact (built on our previous intuition): The MSE is minimized by the conditional expectation

Furthermore, the orthogonality principle applies: is orthogonal to every function of .

While we know the theoretical result, it is difficult in general to compute the desired conditional expectation.

Note that may include infinite sequences, so we assume mean-square limits. The set contains mean-square derivatives, mean-square integrals, and other linear transformations of . (The set is the Hilbert space generated by the linear span of .)

Let's now solve

 ()

A couple important properties:
• If then solves (*) if and only if for all . That is, the error is orthogonal to all elements of .

• for all if and only if and for all .

This is a restatement of orthogonality, but for a restricted space.

Suppose we further restrict to be of the form

That is, is the output of a linear filter driven by . Note that . By property 2, we must have (1)

so that

and (2):

for . That is,

This gives us two equations in the unknowns and . We can eliminate :

or

or

The optimal is that which solves this integral equation.

Since we are dealing with covariances, the means have been eliminated. It is frequently assumed that and have zero means. In this case, the covariances are equal to the correlations, and we can write

This equation is called the Wiener-Hopf equation.

An integral equation of this form is called a Fredholm equation . The theory on the existence of solutions Fredholm integral equations is well-known. In practice, solutions are usually numerical.

The solution is sometimes called a Wiener filter .

The filter in this case is called a Non-Causal Wiener Filter .

It can be shown that the residual error for the noncausal Wiener filter is

This can be seen as follows:

By orthogonality, the last term is 0, which implies that . We thus obtain

The MMSE is sometimes written as

where

Copyright 2008, Todd Moon. Cite/attribute Resource . admin. (2006, June 07). Linear Minimum Mean-Square Error Filtering. Retrieved January 07, 2011, from Free Online Course Materials — USU OpenCourseWare Web site: http://ocw.usu.edu/Electrical_and_Computer_Engineering/Stochastic_Processes/lecture9_1.htm. This work is licensed under a Creative Commons License


text:
# What is the difference between Quaternion.Euler and transform.Rotate?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RotateObjects : MonoBehaviour
{
public GameObject[] objectsToRotate;
public Transform to;
public float speed = 0.1f;
public Vector3 spinDirection;
public bool useMouse = false;
public bool useQuaternion = false;
public bool nonstopSpin = false;

float x;

// Use this for initialization
void Start()
{
if (objectsToRotate.Length > 0)
{
if (useQuaternion == true)
{
for (int i = 0; i < objectsToRotate.Length; i++)
{
objectsToRotate[i].transform.rotation = Quaternion.Lerp(objectsToRotate[i].transform.rotation, to.rotation, Time.time * speed);
}
}
}
}

// Update is called once per frame
void Update()
{
if (objectsToRotate.Length > 0)
{
for (int i = 0; i < objectsToRotate.Length; i++)
{
x += Time.deltaTime * speed;
objectsToRotate[i].transform.rotation = Quaternion.Euler(x, 0, 0);

if (useMouse == true)
{
if (Input.GetMouseButton(0))
{
Rotate(i);
}
}
else
{
Rotate(i);
}
}
}
}

private void Rotate(int i)
{
if (useQuaternion == true)
{
objectsToRotate[i].transform.rotation = Quaternion.Lerp(objectsToRotate[i].transform.rotation, to.rotation, Time.time * speed);
}

if (nonstopSpin == true)
{
objectsToRotate[i].transform.Rotate(0, 1, 0);
}
}
}

In the Update for testing I'm using Quaternion.Euler to spin the object. In the bottom I'm using transform.Rotate.

In both cases I'm getting the same results the object is spinning around it self.

Then what is the difference between them and what should I choose when I want to spin an object ? And maybe there are more way to make an object to spin around it self. But I wonder what is the difference.

Quaternion.Euler generates a Quaternion that represents the orientation or relative rotation specified by the Euler/Tait-Bryan angles you provide as inputs.

Transform.Rotate rotates a transform by an incremental amount, specified by the Euler/Tait-Bryan angles you provide as inputs.

Internally, Transform.Rotate might call Quaternion.Euler or something like it to compute the rotation from the angles. For instance, it might look like this:

public void Rotate(float x, float y, float z, Space relativeTo = Space.Self) {
Quaternion increment = Quaternion.Euler(x, y, z);

if(relativeTo == Space.Self)
this.rotation = this.rotation * increment;
else
this.rotation = increment * this.rotation;
}

So when you just want to rotate an object, you can use either one interchangeably.

Transform.Rotate provides a little convenience for doing this all in one line, with a handy Space selection so you don't have to remember which multiplication order corresponds to local vs world.

But sometimes you don't want to rotate an object right away. Sometimes you just want to transform some vectors. Or you want to cache a rotation rather than apply it to an object immediately. Or you want to do some math to compare, combine & blend orientations before applying them. For those cases, it's handy to be able to create a free-floating Quaternion to work with the rotation, rather than spawn a bunch of dummy objects to rotate whenever you want to do some rotation math. That's where things like Quaternion.Euler or .AngleAxis come in handy.