Open-access Experimental physics laboratory 2: calculating the value of water density using metal rod and water container

Abstract

This article presents a detailed analysis of an undergraduate physics laboratory experiment designed to determine the density of water using fundamental measurement techniques and data analysis methods. The experimental setup consists of a precision scale, a graduated container filled with water, and a suspended metal rod held by a crank, allowing for controlled displacement measurements. The primary objective of this experiment is to reinforce essential concepts in experimental physics, particularly in deriving physical models that correlate measurable quantities, performing precise measurements, and analyzing data using regression techniques via ordinary least squares methods for fitting data into linear models. This article aims to provide students with a theoretical and computational aid to explore the physical interpretations of this experiment. A theoretical framework is derived to introduce fundamental concepts of hydrostatics, Newtonian mechanics, and the main equations used in the experiment. Python codes that perform analysis on the experiment are supplied with thorough explanations.

Keywords:
Water density; Physics 2; Laboratory experiment; Hydrostatics


1. Introduction

In physical science, one main objective is to formulate a theoretical mathematical model to explain physical phenomena, linking the equations and formulas directly to physical quantities that can be measured directly in experiments and used as input to make predictions for other physical quantities that sometimes cannot be measured directly, but only infer [1,2,3]. One example is the aim of this work. To discuss and analyze the caveats that undergraduate students may face in experimental physics class. The subject of this article is the determination of water density measurement using a precision scale, a graduated container filled with water, and a suspended metal rod held by a crank, allowing for controlled displacement measurements. An experiment designed in the Physics Institute of Universidade Federal do Rio de Janeiro (UFRJ) to be taught in the second experimental physics course in STEM undergraduate majors [4, 5].

One of the many caveats that students may struggle with in experimental physics courses is dealing with simple linear regression between two variables. The imposition of a linear model, y = ax + b, may be misleading since not all physical models are linear. This possible misconception of how to transform a nonlinear equation into a linear one can be a limiting conceptual gap in students, making the presentation of linearization techniques of nonlinear equations crucial for students to learn how to apply linear regression to experimental data via ordinary least squares methods. The ability to extract meaningful physical parameters from the slope and intercept of a fitted linear model is of fundamental importance in experimental physics [6,7,8,9,10,11].

By analyzing the collected data and fitting a least-squares regression line to the mass-volume relationship, students can determine the density of water as the slope of the best-fit equation [4, 5]. This article discusses students’ probable misconceptions and difficulties throughout this process, providing insights into pedagogical strategies that can enhance their understanding of experimental physics and data analysis. The results emphasize the importance of integrating theoretical modeling, systematic measurement techniques, and statistical data analysis to improve students’ ability to interpret and extract meaningful physical quantities from experimental observations.

A caveat that students may face is the experimental setup and how simple physical phenomena can alter the results of the experimental measurements, such as friction forces due to the contact of the metal rod with the surface of the container, which may change the mass readings on the scale. Or even the main differences between selecting which model to use, a mass as a function of volume M × V, or the volume as a function of the mass V × M model. The inferred error on the experimental data differs due to the experimental setup and the error propagation, so one model is better. Some students might face difficulties with error propagation techniques.

Hydrostatics is a branch of fluid mechanics that studies the equilibrium of fluids at rest and the forces exerted by or upon them. The fundamental principle governing hydrostatics is Pascal’s law, which states that a change in pressure applied to an enclosed incompressible fluid is transmitted undiminished throughout the fluid [2, 3, 12].

Another crucial concept is Archimedes’ principle, which states that a body submerged in a fluid experiences an upward buoyant force equal to the weight of the displaced fluid [2, 3, 12]. These physical principles are widely applied in engineering, geophysics, and biological systems, forming the theoretical foundation for determining fluid densities experimentally.

In this experiment, an undergraduate-level physics setup is used to determine the density of water through buoyancy measurements. The setup consists of a submerged cylindrical object connected to a spring system, allowing precise volume displacement control. By analyzing the equilibrium conditions before and after submersion, the density of water can be inferred using force balance equations. The experiment demonstrates the practical application of hydrostatic principles and provides students with hands-on experience in fluid mechanics experimentation in the laboratory. For a thorough introduction to the development of this experiment, see Ref. [4], and for the documentation template, see Ref. [5].

This work is organized as follows: Section one approaches some methodological references on experimental physics laboratory courses and caveats that undergraduate students might face during their formative years. Section two discusses and explains the experimental setup, presenting the key physical variables. The third section summarizes the main pitfalls and caveats of the experimental procedure faced by the students. The fourth section presents the theoretical framework and the derivation of the main equations used to model the physical phenomena analyzed in this experiment. Section five introduces fundamental concepts of statistical tools: linear regression, ordinary least squares methods, and error propagation methods. The sixth section presents the results and data analysis from the experiment and how the student should investigate the physical phenomenon in this experiment. Section seven presents a pedagogical discussion on the difficulties faced by the students during the experimentation and the writing of the report. Section eight presents a Python class guide on using it to create the data analysis needed for the experiment. Lastly, the conclusion of this work is presented. The appendix presents the derivation for the slope and the intercept for the Ordinary Least Squares, as well as the errors for each of those estimators.

2. Possible Caveats Faced by Students

Studying experimental physics at the undergraduate level involves a series of pedagogical and practical caveats that affect learning outcomes. Holmes and Wieman [10] demonstrate that traditional â cookbook” labs contribute little to conceptual understanding, as students tend to follow instructions mechanically without engaging in genuine problem-solving. Similarly, Erinosho [13] reveals that difficulties in conceptual comprehensionâ such as the abstract nature of physics and its mathematical rigorâ start early in education and persist into higher education, particularly in experimental contexts.

A recurring issue is students’ struggle with measurement uncertainty. Pessoa et al. [14] and Geschwind et al. [15] show that even after several lab courses, many students still misunderstand uncertainty propagation and lack confidence in comparing results within error margins. Mossmann et al. [16] reinforce this by pointing out that, despite technological aids like automated data acquisition, students often encounter difficulties when interpreting data involving friction and measurement error.

Another key problem lies in the conceptualization of data itself. Buffler et al. [17] introduce the notion of “point” versus “set” paradigms, explaining that novices often fail to consider variability in measurements, instead treating single data points as definitive. In Brazilian engineering labs, Parreira and Dickman [18] observe a misalignment between students and instructors. While students perceive labs as mere reinforcements of theory, instructors seek to develop critical and experimental thinking.

Technological interventions, such as educational software or simulations, present benefits and risks according to works by Silva et al. [19] and Magalhães et al. [20]. They emphasize the value of computational tools to support visualization and data analysis. However, Medeiros and Medeiros [21] warn that over-reliance on simulations may disconnect students from authentic experimental practice, underscoring the need for balance between virtual and hands-on learning.

Finally, Villani and Carvalho [22] highlight that without guided reflection, students often fail to connect experimental procedures to theoretical concepts, which hinders meaningful conceptual change. These studies suggest that undergraduate physics education must move beyond prescriptive lab manuals and integrate deeper inquiry, explicit treatment of uncertainty, and diverse instructional tools to foster robust experimental competence.

3. Experimental Setup

Hydrostatics studies fluids at rest and the forces acting on them. In this experiment, we analyze the hydrostatic forces exerted on a submerged object to determine the density of water using the principles of buoyancy. The setup consists of a graduated cylinder filled with water, a digital scale, and a metal bar suspended by an adjustable support. By recording variations in mass and volume as the bar is gradually submerged, we can quantify the buoyant force exerted by the liquid.

The experimental apparatus, depicted in Fig. 1, consists of two distinct stages. In the first stage, the metal bar is outside the liquid, held by a support that ensures it does not interact with the fluid. The tension in the support balances the bar’s weight, keeping it in equilibrium. In this state, the scale measures the combined mass of the graduated cylinder and the liquid, denoted by M0. The initial liquid volume is V0, providing a reference measurement.

Figure 1
Experimental setup for determining the density of water using hydrostatic principles. (left) Initial setup: A container filled with water is placed on a digital scale, measuring the total weight of the container and the liquid. (right) Modified setup: A metal rod is suspended by an apparatus and partially submerged in the water. The system demonstrates the buoyant force exerted by the liquid on the rod, leading to changes in the scale’s reading. By analyzing these variations, the density of the liquid can be experimentally determined using Archimedes’ principle. ChatGPT-4o generated both images.

In the second stage, the bar is partially submerged in the liquid. As the bar is lowered using the adjustable support, it displaces a volume of fluid, now represented as Vd. According to Archimedes’ principle, the fluid exerts an upward buoyant force E on the submerged portion of the bar. Due to Newton’s third law, action and reaction, the liquid also experiences an equal and opposite force, which alters the scale reading. Consequently, the new mass reading on the scale is M > M0 due to the reaction force acting on the liquid. This setup allows us to quantify the buoyant force by analyzing the variations in mass and volume readings as the bar is submerged.

The materials used in this experiment include a graduated cylinder to measure liquid displacement, a scale to record mass variations, metal bars of different materials and cross-sections, water as the working fluid, and support with a crank for controlled vertical movement of the metal bar.

The following steps are followed: First, the mass of the empty container is measured and denoted as MR. The scale’s precision is checked, and the smallest measurable division is noted. Ensure the support and scale are leveled for accurate readings. The liquid’s initial volume V0 in the graduated cylinder is recorded. The liquid level is adjusted to ensure that the bar can be fully submerged without overflowing.

For data collection, the values of M0 and V0 are measured with the metal bar completely outside the liquid. The bar is lowered incrementally into the liquid using the crank, displacing a volume Vd each time the experiment is executed. The new mass M1 and volume V1 are recorded. This process is repeated for additional measurements (M2, M3, …) and (V2, V3, …) while ensuring that the bar remains suspended and does not touch the graduated cylinder. The students performing the data acquisition notes must record the measured values of Mass M and volume V in a proper table with their respective measurement errors, σM for the mass, and σV for the volume.

The experiment is conducted using two different metal bars, the objective of using two metal bars is to bring to the attention of the students performing the experiment that the calculation of the water density does not depend on the type of material of the two rods, but only on the submerged volume inside the liquid in the recipient, since from Archimede’s Principle, the buoyant force only depends on the liquid density and the displaced volume of liquid. For the second bar, measurements are taken only for volumes equal to or greater than the final measured volume of the first bar. This setup enables a direct experimental verification of Archimedes’ principle by relating mass variations to displaced liquid volume.

The collected data must be processed, refined, and analyzed by the students to calculate water density using a simple linear regression, using the angular coefficients of the estimated line to calculate the value of the water density.

It must be disclaimed that the two images in Fig. 1 were created using Generative Artificial Intelligence (ChatGPT-4o).

To ensure precise control over the displacement of the metal rod into the water, the experimental setup incorporated an adjustable support mechanism coupled with a fine-threaded crank system. The crank allowed for smooth, incremental lowering of the rod, minimizing sudden movements and vibrations that could affect the stability of the measurements. Each crank turn corresponded to a calibrated vertical displacement, enabling the operator to adjust the rod’s immersion depth with high reproducibility. Additionally, the student performing the experimental measurements must use the locking mechanism on the adjustable support to hold the rod in place during mass and volume readings, ensuring no additional movement occurs during data acquisition. This system also played a crucial role in maintaining the rod’s alignment, preventing it from contacting the walls of the container. Such contact could introduce unwanted tangential and normal forces due to friction with the recipientâ s surface, leading to measurement artifacts on the scale. By avoiding these forces, the setup helped preserve the accuracy and reliability of the mass readings during the experiment.

Two different metal rods were intentionally used to help students recognize a key aspect of Archimedes’ principle: that calculating the fluidâ s density does not depend on the geometrical properties or the material composition of the submerged object. According to Archimedes’ principle, the buoyant force acting on a fully or partially submerged object depends solely on the density of the fluid and the volume of the displaced liquid, regardless of the object’s shape, density, or material. Using rods with distinct densities and geometries, students can experimentally verify that the calculated value of the waterâ s density remains the same.

Below in Fig. 2 is a schematic illustration of all the elements used in the experiment to determine the water density value. Elements on the schematic figure are: (A) glass container with known total mass M0 (water + container) and volume V0 of water inside; (B) metal rod with known mass MR; (C) crank for precise lowering of the metal rod; (D) scale; (E) scale measurement arm.

Figure 2
Experiment to determine water density using Archimedes’ principle. Elements on the schematic figure are: (A) glass container with known total mass M0 (container + water) and volume V0 of water; (B) metal rod with known mass MR; (C) crank for precise lowering of the rod; (D) scale; (E) scale measurement arm.

A disclaimer must be made that the image in Fig. 2 was created using Generative Artificial Intelligence (ChatGPT-4o), and the author altered the resulting image to include the labeled elements (A), (B), (C), (D), (E) with the purpose to describe the experimental setup better. It must be noted that even though the image has some evident design flaws, the result is reasonably decent to serve as a visual aid for the readers.

The student must first annotate the initial volume, V0, of water inside the recipient, as indicated by the walls of the container, in milliliters. Then, measure the mass M0 of the container and the water (A), excluding the immersed metal rod (B). Then the students must proceed to use the crank (C) to lower the metal rod (B) carefully and slowly so it does not spill any water, and to avoid the metal rod touching the walls of the container to prevent other forces from appearing due to friction and making the mass measurements less precise. After the rod is immersed, the students must anotate the new volume V in the markers on the wall of the container, now with the added displaced volume δV = VV0 of water due to the immersion of the rod, and then use the scale measurement arm (E) to annotate the new mass measurement M now containing the mass of the immersed rod in the water and noting that Archimedes’ principle states that the buoyant forces on immersed objects in liquids are proportional to the displaced fluid’s weight by the submerged object’s volume.

4. Pedagogical Approach and Pitfalls

This section presents several caveats that students performing the water density determination should avoid while acquiring data points for the analysis. The group of students must follow the procedure listed below.

  • Using the data obtained for water, create a table containing the quantities M and V, along with their respective uncertainties.

  • Initially, identify in the table which parameters are obtained directly and indirectly from the experiment.

  • In the report, show how the results of the indirect measurements and their respective uncertainties were determinedâ for example, the error on the Ordinary Least Squares parameters estimators.

  • Use the equations from the theoretical framework to determine the equation of the line M = aV + b and then perform a linear fit using the experimental data to determine the values of the slope and intercept coefficients.

  • With slope and intercept values or the linear model, indirectly determine the water density value and calculate the estimate’s error.

  • Anotate the values of a±δa for the slope and b±δb for the intercept in tables in the report.

To avoid pitfalls, the students must be attentive to some caveats in the experimentation procedure.

  • The same student must perform the same procedure to reduce errors since each has a different sight, height, or manner of doing the measurements.

  • The group of students must be organized and methodical to write down the data as soon as the measurement is performed.

  • Watch out for the significant numbers of each measurement on the mass and the volume. In some experiments, the setup might be ‘old school’ on purpose. For example, using an old scale instead of a precision scale.

  • Be careful with the crank when lowering the metal rod. If an angle is formed with the vertical, tangential forces may appear, and an experimental error may affect the final calculated value for the water density.

  • Do not let the metal rod touch the sides of the container for the same reason as the last item. Tangential forces may appear due to the contact of the rod with the recipient wall.

  • Be aware of the dimensional analysis. The water density is 0.997 g/ml at 25 degrees Celsius.

There are some caveats that the students must be attentive to regarding the physical interpretation of the experimental results.

  • What model is the best choice to reduce errors if it is either M × V or V × M? And why is that so?

  • How to calculate the linear regression estimator errors that fit the data with the best line.

  • What is the physical interpretation of MR = M0ρV0.

  • Why is the slope calculation in a millimeter paper less accurate than ordinary least squares?

  • How to properly propagate errors and estimate experimental mistakes.

5. Theoretical Framework

In this section a theoretical framework is presented, with the derivation of the equation that relates the experimental measurements of mass for the system metal rod + glass container + water (M) and the total volume V from the initial water volume V0 and the displaced water volume by the immersion of the metal rod in the liquid.

Fig. 3 shows a free body diagram illustration with the forces acting on the system composed of the glass container, the water inside the container, the scale, the metal rod, and the crank holding the metal rod. Image (a) on the left shows the experimental setup, and image (b) on the right depicts the free body diagram of acting forces on the setup.

Figure 3
Free body diagram of forces acting on the experimental setup composed by the glass container, the metal rod holder by the crank, the water inside the container, and the scale, while the metal rod is not yet immersed in the liquid. Image (a) on the left shows the experimental setup, and image (b) on the right shows the free body diagram of acting forces on the apparatus.

Since the metal rod is not yet immersed in the liquid, the only two acting forces on the metal rod are the tension T, and the weight of the metal rod (MRg). So the mass M0 measured by the scale is calculated considering the reaction force N in opposition to the weight M0g of the system, the glass container, and the water.

Fig. 4 below is very similar to Fig. 3, but in a different configuration, now the metal rod was lowered by the crank, and displaced a volume VV0 of water inside the glass container, hence the new mass M measured by the scale is giving by the original mass M0 added by the displaced volume of water. Image (a) on the left depicts the new configuration with the metal rod lowered inside the liquid, and image (b) on the right depicts the free body diagram of forces acting on the system. The new normal reaction acting on the scale is N = Mg, where MM0 is the mass of the displaced volume of water by the partially submersed crank. Now the acting forces on the metal rod are the tension T by the crank, the weight MRg, and the buoyant force E = ρ(VV0)g given by Archimedes’ principle.

Figure 4
Free body diagram of forces acting on the experimental setup composed by the glass container, the metal rod holder by the crank, the water inside the container, and the scale, while the metal rod is immersed in the liquid. Image (a) on the left shows the experimental setup, and image (b) on the right shows the free body diagram of acting forces on the apparatus.

In the scenario where the metal bar is not yet immersed in the water, the scale only reads the reaction of the normal force on the container + liquid system

(1) F 0 = M 0 g

where F0 is the force acting on the scale, M0 is the container’s mass plus the liquid’s mass, and g is the acceleration due to gravity. When a metallic bar is partially inserted into the liquid, forces begin to act on the liquid and the bar. In the static situation, only pressure forces contribute to the resultant force since the force due to the viscosity of the liquid depends on the relative velocity between the bar and the fluid. The sum of the pressure forces that a liquid exerts on a solid is called the buoyant force, and it is given by the Archimedes’ Principle [2, 3]:

(2) E = ρ V d g

where ρ is the density of the liquid, and Vd is the volume of liquid displaced by the solid. In this situation, the buoyant force acts upwards, counteracting the force that pushes the metal bar out of the liquid. The reading on the scale is now M > M0 since a Buoyant force is acting on the system. The resultant force is now F = Mg. Newton’s second law applied to the liquid + container system results in the following expression

(3) M g = E + M 0 g

which can be read as the following expression

(4) E = ( M M 0 ) g

Inserting Eq. (2) in Eq. (4), and noticing that the dislocated volume on the container is given by Vd = VV0, where V is the metal bar volume immersed in the liquid, results

(5) E = ( V V 0 ) ρ g

Eq. (4) and Eq. (5) both represent the buoyancy force, so they must be equal

(6) ( V V 0 ) ρ g = ( M M 0 ) g

And we can put Eq. (6) in the following manner

(7) M = ρ V + ( M 0 ρ V 0 )

or also in the following manner

(8) V = M ρ + V 0 M 0 ρ

The theoretical model predicts that the buoyant force does not depend on any property of the solid, only on the volume of the object immersed in the liquid, see Eq. (2). Eq. (7) and Eq. (8) both represent the same model and show a linear relationship between M and V, of the form y = ax + b, where a is the slope and b is the linear coefficient. However, one must note that statistically, there are differences between those two models.

6. Statistical Tools and Error Analysis

Linear regression is a fundamental tool in experimental physics, enabling researchers and students to derive physical constants and model relationships between measured variables. Bevington and Robinson [6] offer one of the most comprehensive treatments of linear regression within the context of experimental data analysis, emphasizing the importance of least-squares fitting in interpreting measurements. Taylor [7] complements this approach by focusing on the role of uncertainties, guiding students on integrating error analysis into regression results to assess the reliability of their conclusions. Hill [8] provides a practical laboratory manual that introduces linear regression in introductory physics labs, helping students understand the computational and conceptual aspects of data fitting. Meanwhile, Cleveland [9] addresses regression from a data visualization perspective, highlighting how graphical representations can aid in interpreting experimental trends. Holmes and Wieman [10] critique the superficial use of regression in many labs, warning that students often apply linear fits without fully engaging with their scientific meaning or understanding uncertainty propagation.

Linear regression is widely used to model the relationship between two variables when expected to follow a linear trend. Consider a set of data points (xi, yi) for i = 1, 2, …, N. The model assumes the relationship:

(9) y = a x + b ,

where m is the slope and b is the intercept. The slope and intercept can be derived from first principles by minimizing the sum of squared residuals

(10) S = i = 1 N ( y i m x i b ) 2 .

Taking the partial derivatives of S with respect to m and b and setting them to zero leads to the standard equations. Solving them yields

(11) a = N x i y i x i y i N x i 2 ( x i ) 2 ,
(12) b = y i a x i N .

These formulas are commonly used in experimental physics to fit data to a linear model. However, in many physical experiments, the relationship between variables is nonlinear, such as

(13) y = a exp ( b x ) .

This can be linearized by taking the natural logarithm:

(14) ln ( y ) = ln ( a ) + b x ,

allowing the use of linear regression on ln(y) versus x to estimate b and ln(a). Another example is a power-law relationship:

(15) y = a x n ,

which can be linearized as

(16) ln ( y ) = ln ( a ) + n ln ( x ) .

Accurate analysis in experimental physics requires understanding how uncertainties propagate through calculations. For a function f depending on variables x and y

(17) f = f ( x , y ) ,

the uncertainty in f, denoted σf, is given by

(18) σ f = f x σ x 2 + f y σ y 2 ,

where σx and σy are the uncertainties in x and y, respectively. For example, for f = xy

(19) σ f = f σ x x 2 + σ y y 2 .

This propagation formula is central to assessing the final uncertainty in calculated physical quantities. For further discussion, readers can consult Bevington and Robinson [6], Taylor [7], and Hill [8] who provide foundational insights into both linear regression and uncertainty analysis.

In summary, linear regression and error propagation are key to drawing reliable conclusions from experimental data. Mastering these techniques allows physicists to interpret trends, validate models, and quantify the confidence in their results.

7. Data Analysis and Discussion

This section presents a thorough discussion on the analysis of the experimental data. Present how the data should be organized in a table with the values for the pairs (Mi, Vi) with their respective errors ±δMi and ±δVi. A discussion is presented on how a model M × V is more appropriate than a model V × M due to error propagation. A model M × V requires a smaller margin of error for statistical confidence.

Consider the experimental setup consisting of a graduated container partially filled with a liquid of density ρliquid and a metallic bar that can be gradually immersed in the liquid, as shown in Fig. 1 and Fig. 2, then The key variables are defined as follows:

  • M0: Mass reading on the sca when the bar is outside the liquid. It is the mass of the system, liquid + container. It can be directly measured using the scale.

  • M: Mass reading when the bar is partially immersed. It can be measured experimentally. It is formed by the system liquid + container + partially immersed metal rod.

  • V0: Initial volume of the liquid before submersion of the metal rod. It can be directly measured.

  • V: Volume of the liquid after submersion. It is the volume V0 added by the dislocated volume Vd. It can be directly measured experimentally.

  • Vd: Volume of the liquid displaced by the submerged part of the bar. It can only be calculated with the formula Vd = VV0.

  • g: Acceleration due to gravity. It cannot be directly measured but does not play a key role in this experiment; it only appears due to Newton’s laws.

  • E: Buoyant force acting on the submerged portion of the bar.

  • MR: It is the intercept of the model M = aV + MR, defined by MR = M0ρV0. It cannot be measured directly; it is only calculated.

The table below presents a submerged object’s measured mass and volume values to study buoyancy and fluid properties in an experimental setup. Each measurement includes its associated uncertainty, denoted as δMi for mass and δVi for volume, which accounts for instrumental precision and experimental variations. Additionally, the relative uncertainties, δMiMi and δViVi, are provided to quantify the accuracy of the measurements.

From Table 1, it is evident that the relative uncertainties in both mass and volume measurements remain consistent, with δMiMi=0.025 and δViVi=0.050 across all data points. This consistency ensures that the error propagation in the regression analysis is well-controlled. The regression computation incorporated the experimental uncertainties to provide a more robust estimation of the parameters.

Table 1
Experimental data table.

To estimate the density of water from the experimental data, students can determine the slope of the mass-volume relationship using a simple graphical method on millimeter paper. A straight-line approximation can be drawn through the data points by plotting the mass M against the volume V. The slope of this line, which corresponds to the density, can be estimated using the fundamental definition from differential calculus:

(20) a = Δ M Δ V = M 2 M 1 V 2 V 1

where (V1, M1) and (V2, M2) are two points chosen from the experimental data. For instance, selecting the points (V1 = 110.0, M1 = 210.81) and (V2 = 200.0, M2 = 300.78) from the experimental table, we compute the slope as:

(21) a = 300.78 210.81 200.0 110.0 = 89.97 90.0 = 0.9997 g/mL .

While this method estimates the density, it is susceptible to the specific points chosen. Ideally, the best-fit line for the data should be obtained through an Ordinary Least Squares regression, which minimizes the sum of squared residuals, given by:

(22) e i = M i a ^ V i b ^ ,

Where a^ and b^ are the slope and intercept of the best-fit line, the best estimator parameters for the best line selected by the Ordinary Least Squares method. This approach minimizes the overall error across all data points rather than relying on just two chosen points. In contrast, manually selecting points introduces significant variability, as minor fluctuations in measurement values can lead to disproportionately large errors in the estimated slope.

By employing Ordinary Least Squares regression, students can more accurately determine the density of water while accounting for the inherent uncertainties in experimental data. Though useful for a rough approximation, the graphical method is prone to errors that statistical regression techniques can systematically reduce.

When selecting a model to determine the density of water, one must consider the mathematical implications of choosing either the M × V model, where mass is expressed as a function of volume, or the V × M model, where volume is described as a function of mass. The choice significantly affects the density estimation accuracy due to differences in how errors propagate. For the M × V model, the relationship is given by:

(23) M = ρ V + ( M 0 ρ V 0 ) ,

where the slope of the regression line directly corresponds to the water density, ρ. The uncertainty in the estimated slope, σa, is given by:

(24) σ a = σ i = 1 N ( V i V ¯ ) 2 ,

Where σ is the standard deviation of the residuals ei from Eq. (22) can be approximated by a normal distribution and estimated from the data in Table 1. This model allows for a straightforward calculation of ρ, as the slope of the linear fit directly gives it. On the other hand, the V × M model follows the equation:

(25) V = 1 ρ M + V 0 M 0 ρ .

Now, the uncertainty in the estimated slope is given by

(26) σ a = σ i = 1 N ( M i M ¯ ) 2 ,

Here, the slope of the regression line is a=1ρ, meaning that the density must be obtained by inverting the slope:

(27) ρ = 1 a .

However, this inversion introduces a more complex error propagation, decreasing the uncertainty in ρ. The standard error in the density estimate becomes:

(28) σ ρ = d ρ d a σ a = σ a a 2 .

Since the error is magnified by the inverse square of the slope, the V × M model leads to a less significant error in the estimate of ρ compared to the M × V model. Also, since the error in the measurement of M is more accurate than the ones in volume, the error estimation on the slope a is less when one uses M in the abcissa instead of V. This can be seen from Eq. (24) and Eq. (26), where the estimate for the slope error σa is inversely proportional to the sum of mean square error for the abscissa values. Using experimental data that minimizes the mean square error leads to a better mathematical model, which is the case for the mass measurements M ± δM. This decreased uncertainty makes precise density determination more desirable. Thus, from a statistical standpoint, the best approach is to use the V × M model.

Figure 5 shows the data points and the best fit line for the model V × M, considering the abscissa values as the mass measurements. The figure shows the error bars for the x-axis and y-axis measurements and an uncertainty band. The estimated value for the water density found for this model was

Figure 5
Least Squares Regression: Volume vs. Mass. The plot shows experimental data (black markers with error bars) and a linear regression best-fit line (dashed blue). The equation of the best-fit line is given as y = (0.986±0.022)x + (−95.988±5.619), where the uncertainties in the slope and intercept are provided. The shaded blue region represents the uncertainty band around the regression line, indicating the confidence interval.
(29) ρ V × M ± σ ρ = 0.986 ± 0.022

Considering the reference value (ρref) for the water density at 25° as

(30) ρ ref ± σ ρ = 0.997 ± 0.001 ,

one can calculate the relative discrepancy (D) given by the formula below

(31) D = x ref x ¯ x ref ,

where xref is the reference value of the physical quantity we are calculating, and x¯ is the calculated value using the mathematical model for the experiment. In this case, x is the water density.

From Eq. (30), the measurement interval for the water density ranges from 0.996 to 0.998. So, the calculated value for the water density in Eq. (29) is out of the accepted measured interval, and the relative discrepancy is

(32) D = 0.997 0.986 0.997 = 1.15 % .

Since the calculated value for the water density is out of the accepted measure interval, the precision for this calculation needs to be improved. It would be necessary to experiment again, paying attention to the measured values to reduce experimental errors.

Figure 6 shows the data points for the model M × V, the best fitted line using Ordinary Least Squares, and the error bars for the measurements of volume (abscissa) and the mass (ordinate) and an uncertainty band. The estimated value for the water density found for this model was

Figure 6
Least Squares Regression: Mass vs. Volume. The plot shows experimental data (black markers with error bars) and a linear regression best-fit line (dashed blue). The equation of the best-fit line is given as y = (1.011±0.022)x + (98.017±3.544), where the uncertainties in the slope and intercept are provided. The shaded blue region represents the uncertainty band around the regression line, indicating the confidence interval.
(33) ρ M × V ± σ ρ = 1.011 ± 0.022.

The model M × V has a worse precision for the water density calculation than the model V × M, considering the same data points. This happens due to the larger error in the volume measurements now used as an explanatory variable. The value found for this model is also out of the accepted measure interval for the water density value of 0.997 ± 0.001. The relative discrepancy is

(34) D = 0.997 1.011 0.997 = 1.37 % .

Table 2 contains the experimental data points for mass (M) and volume (V), the respective squared errors (Mi-M¯)2 for mass and (Vi-V¯)2 for the volume, and experimental errors δMi and δVi for each of the measurements.

Table 2
This table contains the experimental data points , squared errors for mass and volume, and respective experimental errors.

To understand how the precision of the measurements affects the mathematical models results and the calculated value for the water density, divide the estimated error σa(M×V) given by Eq. (24) for the model M × V by the error σa(V×M) from model V × M in Eq. (26), considering the same value for the standard deviation σ, then

(35) σ a ( M × V ) σ a ( V × M ) = i = 1 N ( M i M ¯ ) 2 i = 1 N ( V i V ¯ ) 2 = 1.01

8. Pedagogical Discussion

This experiment is a fundamental exercise in experimental physics, teaching students the essential skills required to derive, measure, and analyze physical quantities that cannot be directly observed with the available apparatus. Determining water density exemplifies how direct measurements of mass and volume can be used to estimate an unknown parameter through mathematical modeling and data analysis. This process is crucial for students to develop a deeper understanding of physical laws and how to translate observed phenomena into quantitative models.

A key learning outcome of this experiment is the necessity of deriving mathematical equations that describe physical reality. Students must establish a theoretical framework that links mass and volume to density, collect corresponding data points, and use regression techniques to estimate the model parameters. This structured approach fosters a better comprehension of how scientific models are built and refined, reinforcing that physical observables are often not directly measurable but must be inferred from empirical data.

Beyond theoretical modeling, students are introduced to statistical methods for treating experimental data. Implementing Ordinary Least Squares regression is a crucial part of the learning process, as it allows for parameter estimation by minimizing residual errors. Many students struggle to grasp the significance of this method despite its historical relevance dating back to Gauss and its continued application in modern data analysis. By working through this experiment, students gain firsthand experience applying regression to actual data, appreciating its importance in ensuring accurate and reliable estimations.

Moreover, this experiment highlights the necessity of computational methods in modern physics and engineering. Real-world datasets often contain missing values, errors, or inconsistencies, making manual data handling impractical. Encouraging students to use programming tools such as Python for data analysis fosters a computational mindset, equipping them with indispensable skills in today’s data-driven scientific landscape. With advancements in machine learning and neural networks, data estimation and gap-filling techniques have become more sophisticated, and students must be aware of these evolving methodologies.

Another critical pedagogical aspect of this experiment is the emphasis on graphical representation. In an era where data literacy is increasingly essential, students must learn to interpret and construct meaningful visualizations. Many struggle with reading tables or understanding simple linear relationships between independent and dependent variables. Using graphing techniques, students develop a more precise intuition for how one physical quantity influences another within a mathematical model. These skills are vital in physics and a broad range of STEM disciplines, where data visualization is a key component of decision-making and communication.

Finally, an often-overlooked yet fundamental skill in experimental physics is the ability to write a structured scientific report. Communicating findings, formally and technically, is essential for students pursuing careers in STEM fields. The ability to articulate experimental objectives, describe methodologies, analyze results, and present conclusions coherently and professionally is just as important as experimenting. By emphasizing the scientific method in their writing, students refine their ability to document and convey their findings effectively, preparing them for future research and technical work.

In conclusion, this experiment provides a comprehensive learning experience that integrates theoretical modeling, statistical data treatment, computational tools, graphical literacy, and scientific communication. By engaging with these elements, students develop a well-rounded skill set that prepares them for more complex challenges in physics, engineering, and data science. Encouraging a rigorous approach to experimental analysis enhances their understanding of physical principles and cultivates critical thinking and problem-solving abilities essential for any scientific career.

9. Python Class

The <cps:monospace>WaterDensity</cps:monospace> class was implemented in Python to simulate experimental data relating mass and volume and to model their relationship through linear regression. This Python class was designed to generate synthetic datasets and provide analysis tools, including visualization and formatted data output for scientific reporting.

The class is initialized with the reference parameters M0, V0, and ρ, respectively, representing the reference mass, reference volume, and fluid density. Once initialized, the gen_fake_data method can be used to simulate experimental data based on a linear model of the form:

(36) M = ρ V + ( M 0 ρ V 0 ) + ϵ

where ϵ represents random experimental noise, the method outputs a dataset including mass (M), volume (V), and their associated uncertainties (δM and δV).

The synthetic data is then analyzed using the calculate_fit method, which applies a least squares linear regression to obtain estimates for the slope a and intercept b of the fitted model M = aV + b. This method also computes the uncertainties in both parameters (σa and σb) and the residual standard error of the fit, σy.

The plot_regression method generates a plot displaying the simulated data points with their corresponding error bars to visualize the results. The plot also shows the best-fit regression line and an uncertainty band derived from the propagated errors in the fit parameters.

The data table can be formatted into LaTeX-ready code using the format_table method, which produces a structured table displaying Mi ± δMi and Vi ± δVi values, as well as their fractional uncertainties.

Finally, the export_latex_table method outputs the formatted table as LaTeX code. This code can be printed directly to the screen or exported to a .tex file for easy integration into LaTeX documents.

The implementation enables data analysis and reporting automation for experiments that characterize mass-volume relationships, such as determining liquid density.

The class was designed for interactive use in Python environments like Jupyter Notebook. After importing the class with from mass_volume_regression import WaterDensity, the user creates an instance of the class and initializes it with values for M0, V0, and ρ. The user then calls gen_fake_data to simulate the dataset. The regression analysis is performed using calculate_fit, and the regression results can be visualized with plot_regression.

Once the data is analyzed, the user can call format_table to prepare the dataset for inclusion in scientific reports. The LaTeX table can be printed to the screen or saved as a file using export_latex_table.

An example of typical usage is presented below. Just use a Jupyter notebook and import the Python class. First, save the Python class in a Python file (.py). You can leave the Python notebook and the class file in the same folder, so you do not need to create path environment variables for the file.

Listing 1
Example usage of WaterDensity class in Jupyter Notebook

The reader may also refer to the following GitHub repo for more Python material related to this article. More usage examples will be updated, and a Jupyter Notebook with the example can be downloaded for study purposes. If the repo code is used in any publication, refer to it via link. https://github.com/ozsantospereira/water_density_physexp

10. Conclusion

This study analyzed an undergraduate physics laboratory experiment designed to determine the density of water using fundamental measurement techniques and regression analysis. The experimental setup, which includes a precision scale, a graduated container filled with water, and a suspended metal rod, allows students to develop critical skills in experimental physics. Throughout the experiment, students are challenged to derive theoretical models that link physical observable variables that can be experimentally measured, such as mass and volume, to the physical quantity of interestâ water density via a mathematical formula.

One of the main difficulties students may encounter is understanding the process of model linearization to achieve a linear regression via Ordinary Least Squares methods. Additionally, simple but often overlooked physical phenomena, such as frictional forces between the metal rod and the container’s surface, can introduce systematic errors, affecting the results. Furthermore, students may often face conceptual challenges in selecting the appropriate model to analyze mass as a function of volume (M × V), or volume as a function of mass (V × M). This choice directly influences the error propagation and the reliability of the final water density calculation.

This article addresses some of the challenges that students may face by providing theoretical and computational guidance to gain deeper insight into the physical interpretations of their experimental results. It presents key elements of data analysis similar to what would be expected in a lab exam or documentation. Python scripts are provided to fit the linear model and visualize the experimental data, reinforcing the importance of integrating computational tools into experimental physics education.

This work highlights the necessity of pedagogical approaches that bridge theoretical concepts with hands-on experimental work and computational tools, ultimately fostering a more robust understanding of data analysis and physical modeling in undergraduate courses of physical science and engineering curricula.

Supplementary material

The following online material is available for this article:

Appendix A

Appendix B

Appendix C

Data Availability

All the data was synthetically generated by a python script described in the article in section 8 (Python class).

References

  • [1] R.P. Feynman, R.B. Leighton and M. Sands, The Feynman Lectures on Physics (Basic Books, New York, 2011), v. 1.
  • [2] D. Halliday, R. Resnick and K.S. Krane, Physics (John Wiley & Sons, New Jersey, 2010), v. 2.
  • [3] H.M. Nussenzveig, Física Básica (Editora Edgar Blücher, São Paulo, 1977), v. 2.
  • [4] Universidade Federal do Rio de Janeiro, Tutorial de Física Experimental II, available in: http://fisexp2.if.ufrj.br/Fisexp2_Apostila2024.pdf
    » http://fisexp2.if.ufrj.br/Fisexp2_Apostila2024.pdf
  • [5] Universidade Federal do Rio de Janeiro, Folha do Relatório 1: Estudo Experimental da Força de Empuxo, available in: http://fisexp2.if.ufrj.br/Relatorios/Relatorio_1.pdf
    » http://fisexp2.if.ufrj.br/Relatorios/Relatorio_1.pdf
  • [6] P.R. Bevington and D.K. Robinson, Data Reduction and Error Analysis for the Physical Sciences (McGraw-Hill, New York, 2003), 3 ed.
  • [7] J.R. Taylor, An Introduction to Error Analysis: The Study of Uncertainties in Physical Measurements (University Science Books, Melville, 1997), 2 ed.
  • [8] E. Hill, in Physics 51 Lab Manual (University of Redlands, California, 2017). Available at: https://facweb1.redlands.edu/fac/eric_hill/Phys233/Lab/LabRefCh8%20Linear%20Regression.pdf.
    » https://facweb1.redlands.edu/fac/eric_hill/Phys233/Lab/LabRefCh8%20Linear%20Regression.pdf.
  • [9] W.S. Cleveland, Visualizing Data (Hobart Press, New Jersey, 1993).
  • [10] N.G. Holmes and C.E. Wieman, Physics Today 71, 38 (2018).
  • [11] J.H. Vuolo, Fundamentos da Teoria de Erros (Editora Edgar Blücher, São Paulo, 1992).
  • [12] F.M. White, Fluid Mechanics (McGraw-Hill, New York, 2016).
  • [13] S.Y. Erinosho, International Journal for Cross Disciplinary Subjects in Education 3, 1510 (2013).
  • [14] L. Pessoa, A.V. Crisci and J.G. Magalhães, Canadian Journal of Physics Education 60, 45 (2025).
  • [15] N. Geschwind, L. Carr and H. Lewandowski, American Journal of Physics 92, 30 (2024).
  • [16] V.L.F. Mossmann, K.B. Mello, F. Catelli, H. Libardi and I.S. Damo, Revista Brasileira de Ensino de Física 24, 146 (2002).
  • [17] A. Buffler, S. Allie and F. Lubben, International Journal of Science Education 23, 1137 (2001).
  • [18] M. Parreira and M. Dickman, Revista Brasileira de Ensino de Física 42, e20190304 (2020).
  • [19] W.P. Silva, C.M.D.P.S. Silva, C.D.P.S. Silva, I.B. Soares and D.D.P.S. Silva, Revista Brasileira de Ensino de Física 24, 221 (2002).
  • [20] M.G.M. Magalhães, D. Schiel, I.M. Guerrini and E. Marega Jr., Revista Brasileira de Ensino de Física 24, 97 (2002).
  • [21] A. Medeiros and C.F. Medeiros, Revista Brasileira de Ensino de Física 24, 77 (2002).
  • [22] A. Villani and A.M.P. Carvalho, Caderno Catarinense de Ensino de Física 11, 3 (1994).

Edited by

Publication Dates

  • Publication in this collection
    18 July 2025
  • Date of issue
    2025

History

  • Received
    11 Feb 2025
  • Reviewed
    28 Apr 2025
  • Accepted
    27 May 2025
location_on
Sociedade Brasileira de Física - SBF Av. Prof. Lineu Prestes, 748, Bloco B - Cidade Universitária, São Paulo, SP, Brasil, CEP 05508-000, Tel: +55 (11) 3091-6680 - São Paulo - SP - Brazil
E-mail: rbef@sbfisica.org.br, marcellof@unb.br
rss_feed Acompanhe os números deste periódico no seu leitor de RSS
Reportar erro