{"id":2086,"date":"2026-02-23T16:55:55","date_gmt":"2026-02-23T15:55:55","guid":{"rendered":"https:\/\/bioeducator.eu\/?p=2086"},"modified":"2026-02-23T16:55:56","modified_gmt":"2026-02-23T15:55:56","slug":"do-you-calculate-linearity-properly","status":"publish","type":"post","link":"https:\/\/bioeducator.eu\/?p=2086&lang=en","title":{"rendered":"Do You calculate Linearity properly?"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Imagine the following situation. You are testing the linearity of an analytical method, let&#8217;s say HPLC. The linearity coefficient is R=0.999, the coefficient of determination is R<sup>2<\/sup> = 0.999. An ideal situation. The criteria are met, the validation is successful. Now all that&#8217;s left is to write the report and go home. Nothing could be further from the truth. There may be a hidden gremlin in our data that is not visible at first glance. However, residual analysis will help us with this.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-1024x559.png\" alt=\"Analiza resztkowa w wyznaczaniu liniowo\u015bci\nResidal analysis in linearity determination\" class=\"wp-image-2082\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-1024x559.png 1024w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-300x164.png 300w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-768x419.png 768w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-1536x838.png 1536w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-2048x1117.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Linearity and regression model fit<\/h2>\n\n\n\n<p>In 2023, the ICH published a new guideline, ICH Q2 \u2013 Validation of Analytical Methods. One of the changes concerned the determination of linearity. The new guidelines took into account biological methods such as ELISA and cytotoxicity tests. These methods are often based on non-linear calibration models. Therefore, it is impossible to determine their linearity.<\/p>\n\n\n\n<p>For this reason, linearity has been replaced by regression model fitting in the new ICH Q2. This does not change the fact that the term linearity can still be used for methods that are linear in nature.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does linear regression work?<\/h2>\n\n\n\n<p>In order to determine the concentration, a calibration curve is constructed. Several solutions of known concentration are analysed and, based on the results obtained, a graph of the linear dependence of the signal on the concentration is generated. Of course, the measured values may not coincide perfectly with the curve. Therefore, interpolation is used, in which the line of the graph runs between the measured points. The course is not random and is determined so that the sum of the squares of the measurement errors is the smallest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linearity coefficient and coefficient of determination<\/h2>\n\n\n\n<p>When determining linearity and reading results, we may encounter two values: the linearity coefficient \u2013 R, and the coefficient of determination \u2013 R<sup>2<\/sup>. How do they differ?<\/p>\n\n\n\n<p>Linearity coefficient (R) \u2013 identical to Pearson&#8217;s correlation coefficient. It indicates whether the relationship between data is linear and to what extent. The closer the value is to 1, the stronger the correlation.<\/p>\n\n\n\n<p>Coefficient of determination (R\u00b2) \u2013 This is calculated by squaring the R value. It indicates the fit of the regression model, i.e. how well the concentration can be determined based on the signal measurement.<\/p>\n\n\n\n<p>OK, our data is perfect: linearity coefficient R = 0.9999, coefficient of determination R2 = 0.9999? Well, theoretically, the model is a perfect fit. Perhaps even accuracy would not reveal any problems. However, it is possible that we are calculating something wrong and our method is even more accurate than we think.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Residual analysis \u2013 is the model truly linear?<\/h2>\n\n\n\n<p>Residual analysis is one of the stages of regression model evaluation. It involves examining the differences (residuals) between the observed (measured) values and the values read from the regression model. The residuals (e) represent model errors. Their position on the concentration dependence graph can indicate whether the model is properly fitted.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"92\" height=\"28\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-4.png\" alt=\"\" class=\"wp-image-2080\"\/><\/figure>\n<\/div>\n\n\n<p>Analysis of the graph showing the relationship between concentration and residual values can help to determine the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Verification of model correctness<\/li>\n\n\n\n<li>Verification of variance homogeneity (homoscedasticity)<\/li>\n\n\n\n<li>Identification of outliers<\/li>\n<\/ol>\n\n\n\n<p>To explain residual analysis, we will use the following data set:<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Concentration<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">50<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2483571<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">75<\/td><td class=\"has-text-align-center\" data-align=\"center\">159,9308678<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,3238443<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">125<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,7615149<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">150<\/td><td class=\"has-text-align-center\" data-align=\"center\">309,8829233<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-10.png\" alt=\"Linear calibartion curve\" class=\"wp-image-2093\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-10.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-10-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n<p>The signal represents the measured values. To calculate the residuals, we need to determine the expected values based on the equation of the curve y=ax +b.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Concentration<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal (y)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Expected values (\u0177)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">50<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2483571<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2095456<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">75<\/td><td class=\"has-text-align-center\" data-align=\"center\">159,9308678<\/td><td class=\"has-text-align-center\" data-align=\"center\">160,2195235<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,3238443<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,2295015<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">125<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,7615149<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,2394794<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">150<\/td><td class=\"has-text-align-center\" data-align=\"center\">309,8829233<\/td><td class=\"has-text-align-center\" data-align=\"center\">310,2494574<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Then, using the difference between the measured values and the expected values, we determine the remainders.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">Concentration<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal (y)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Expected values (\u0177)<\/td><td class=\"has-text-align-center\" data-align=\"center\">Residuals (e)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">50<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2483571<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2095456<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,038811<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">75<\/td><td class=\"has-text-align-center\" data-align=\"center\">159,9308678<\/td><td class=\"has-text-align-center\" data-align=\"center\">160,2195235<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,28866<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,3238443<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,2295015<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,094343<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">125<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,7615149<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,2394794<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,522035<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">150<\/td><td class=\"has-text-align-center\" data-align=\"center\">309,8829233<\/td><td class=\"has-text-align-center\" data-align=\"center\">310,2494574<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,36653<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">&nbsp;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&nbsp;<\/td><td class=\"has-text-align-center\" data-align=\"center\">&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-11.png\" alt=\"Residual analysis plot (linear regression) \" class=\"wp-image-2094\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-11.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-11-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n<p>In general:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The residual values should be evenly distributed on both sides of the horizontal line 0.<\/li>\n\n\n\n<li>No clear trend or shape indicates a good fit for the linear model.<\/li>\n\n\n\n<li>Outliers can be observed.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Case study<\/h3>\n\n\n\n<p>To demonstrate the true power of residual analysis, I will use a set of three data points.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\" colspan=\"2\">Case 1<\/td><td class=\"has-text-align-center\" data-align=\"center\" colspan=\"2\">Case 2<\/td><td class=\"has-text-align-center\" data-align=\"center\" colspan=\"2\">Case 3<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">Cocncentration<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal<\/td><td class=\"has-text-align-center\" data-align=\"center\">Residuals<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal<\/td><td class=\"has-text-align-center\" data-align=\"center\">Residuals<\/td><td class=\"has-text-align-center\" data-align=\"center\">Signal<\/td><td class=\"has-text-align-center\" data-align=\"center\">Residuals<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">50<\/td><td class=\"has-text-align-center\" data-align=\"center\">110,2483571<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,0388115<\/td><td class=\"has-text-align-center\" data-align=\"center\">114,9531726<\/td><td class=\"has-text-align-center\" data-align=\"center\">2,345937031<\/td><td class=\"has-text-align-center\" data-align=\"center\">109,80000<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,440000<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">75<\/td><td class=\"has-text-align-center\" data-align=\"center\">159,9308678<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,288655683<\/td><td class=\"has-text-align-center\" data-align=\"center\">161,5658426<\/td><td class=\"has-text-align-center\" data-align=\"center\">-1,031487151<\/td><td class=\"has-text-align-center\" data-align=\"center\">160,40000<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,400000<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">100<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,3238443<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,094342782<\/td><td class=\"has-text-align-center\" data-align=\"center\">210,1534869<\/td><td class=\"has-text-align-center\" data-align=\"center\">-2,433936904<\/td><td class=\"has-text-align-center\" data-align=\"center\">209,20000<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,560000<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">125<\/td><td class=\"has-text-align-center\" data-align=\"center\">260,7615149<\/td><td class=\"has-text-align-center\" data-align=\"center\">0,522035486<\/td><td class=\"has-text-align-center\" data-align=\"center\">261,1561051<\/td><td class=\"has-text-align-center\" data-align=\"center\">-1,421412863<\/td><td class=\"has-text-align-center\" data-align=\"center\">261,20000<\/td><td class=\"has-text-align-center\" data-align=\"center\">1,680000<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">150<\/td><td class=\"has-text-align-center\" data-align=\"center\">309,8829233<\/td><td class=\"has-text-align-center\" data-align=\"center\">-0,366534085<\/td><td class=\"has-text-align-center\" data-align=\"center\">315,108512<\/td><td class=\"has-text-align-center\" data-align=\"center\">2,540899887<\/td><td class=\"has-text-align-center\" data-align=\"center\">308,20000<\/td><td class=\"has-text-align-center\" data-align=\"center\">-1,080000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-12.png\" alt=\"Linear regression (case 1)\" class=\"wp-image-2095\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-12.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-12-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-13.png\" alt=\"Linear regression (case 2)\" class=\"wp-image-2096\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-13.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-13-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"452\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-14.png\" alt=\"Linear regression (case 3)\" class=\"wp-image-2097\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-14.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-14-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>The residual plots for these cases are as follows:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15.png\" alt=\"Residual analysis (linear)\" class=\"wp-image-2099\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"452\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16.png\" alt=\"Residual analysis (polynomial)\" class=\"wp-image-2100\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17.png\" alt=\"Residual analysis (heteroscedasticity)\" class=\"wp-image-2101\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>What can we conclude from the graphs?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Case 1:<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>The points are evenly distributed on both sides of the value 0. There is no clear trend in the position of the points. This indicates a good fit for the linear model.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15.png\" alt=\"\" class=\"wp-image-2099\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-15-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Case 2:<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>The characteristic parabolic shape of the points. This shape indicates the non-linear nature of the distribution of points. In most cases, they have a binomial distribution (second-degree function). In this case, the use of a linear model is incorrect despite the high R<sup>2<\/sup> value, as the relationship is non-linear.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"452\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16.png\" alt=\"\" class=\"wp-image-2100\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-16-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Case 3:<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>The residuals move away from 0 as the concentration increases (funnel shape). This indicates heteroscedasticity. In this case, weighted regression should be used.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"451\" src=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17.png\" alt=\"\" class=\"wp-image-2101\" srcset=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17.png 752w, https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/image-17-300x180.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>Based on the above data, it is quite clear that the values of R or R<sup>2<\/sup> can be misleading. When determining linearity, it is worth taking a closer look at the data and assessing whether the calibration model we have used is actually the best and consistent with mathematics.<\/p>\n\n\n\n<p>Unfortunately, in most cases, the software used to operate the equipment and analyse the results will not perform this analysis. It is therefore worth using special statistical tools such as Statistica or Minitab, or simply a spreadsheet, to assess whether the linearity is actually linear.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sources:<\/h2>\n\n\n\n<p><a href=\"https:\/\/database.ich.org\/sites\/default\/files\/ICH_Q2%28R2%29_Guideline_2023_1130_ErrorCorrection_2025.pdf\">ICH Q2<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/pogotowiestatystyczne.pl\/slowniki\/homoskedastycznosc\/\">pogotowiestatystyczne.pl<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/pogotowiestatystyczne.pl\/slowniki\/homoskedastycznosc\/\">sixsigmadsi.com<\/a><\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2318520657460692\"\n     crossorigin=\"anonymous\"><\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine the following situation. You are testing the linearity of an analytical method, let&#8217;s say HPLC. The linearity coefficient is R=0.999, the coefficient of determination&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2082,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[170],"tags":[],"class_list":["post-2086","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-brak-kategorii"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Do You calculate Linearity properly? - Bioeducator.eu<\/title>\n<meta name=\"description\" content=\"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bioeducator.eu\/?p=2086&lang=en\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Do You calculate Linearity properly? - Bioeducator.eu\" \/>\n<meta property=\"og:description\" content=\"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bioeducator.eu\/?p=2086&amp;lang=en\" \/>\n<meta property=\"og:site_name\" content=\"Bioeducator.eu\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-23T15:55:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-23T15:55:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-1024x559.png\" \/>\n<meta name=\"author\" content=\"radoslaw.obuchowicz\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Napisane przez\" \/>\n\t<meta name=\"twitter:data1\" content=\"radoslaw.obuchowicz\" \/>\n\t<meta name=\"twitter:label2\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#article\",\"isPartOf\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en\"},\"author\":{\"name\":\"radoslaw.obuchowicz\",\"@id\":\"https:\/\/bioeducator.eu\/#\/schema\/person\/fdd8b0df5f6951b44d42ab42ade1beec\"},\"headline\":\"Do You calculate Linearity properly?\",\"datePublished\":\"2026-02-23T15:55:55+00:00\",\"dateModified\":\"2026-02-23T15:55:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en\"},\"wordCount\":875,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bioeducator.eu\/#organization\"},\"image\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png\",\"articleSection\":[\"Brak kategorii\"],\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bioeducator.eu\/?p=2086&lang=en#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en\",\"url\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en\",\"name\":\"Do You calculate Linearity properly? - Bioeducator.eu\",\"isPartOf\":{\"@id\":\"https:\/\/bioeducator.eu\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png\",\"datePublished\":\"2026-02-23T15:55:55+00:00\",\"dateModified\":\"2026-02-23T15:55:56+00:00\",\"description\":\"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.\",\"breadcrumb\":{\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bioeducator.eu\/?p=2086&lang=en\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage\",\"url\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png\",\"contentUrl\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png\",\"width\":2560,\"height\":1396},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bioeducator.eu\/?p=2086&lang=en#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\u0142\u00f3wna\",\"item\":\"https:\/\/bioeducator.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Do You calculate Linearity properly?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bioeducator.eu\/#website\",\"url\":\"https:\/\/bioeducator.eu\/\",\"name\":\"Bioeducator.eu\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/bioeducator.eu\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bioeducator.eu\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bioeducator.eu\/#organization\",\"name\":\"Bioeducator.eu\",\"url\":\"https:\/\/bioeducator.eu\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/bioeducator.eu\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2025\/03\/Bioeducator_logo_poziom.png\",\"contentUrl\":\"https:\/\/bioeducator.eu\/wp-content\/uploads\/2025\/03\/Bioeducator_logo_poziom.png\",\"width\":3910,\"height\":935,\"caption\":\"Bioeducator.eu\"},\"image\":{\"@id\":\"https:\/\/bioeducator.eu\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/bioeducator.eu\/#\/schema\/person\/fdd8b0df5f6951b44d42ab42ade1beec\",\"name\":\"radoslaw.obuchowicz\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/bioeducator.eu\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fcbdc1450632bf52b5257736b7b7ea5b6781f6b5ebf9cd50c06b709c3b220846?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fcbdc1450632bf52b5257736b7b7ea5b6781f6b5ebf9cd50c06b709c3b220846?s=96&d=mm&r=g\",\"caption\":\"radoslaw.obuchowicz\"},\"sameAs\":[\"http:\/\/bioeducator.eu\"],\"url\":\"https:\/\/bioeducator.eu\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Do You calculate Linearity properly? - Bioeducator.eu","description":"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bioeducator.eu\/?p=2086&lang=en","og_locale":"pl_PL","og_type":"article","og_title":"Do You calculate Linearity properly? - Bioeducator.eu","og_description":"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.","og_url":"https:\/\/bioeducator.eu\/?p=2086&lang=en","og_site_name":"Bioeducator.eu","article_published_time":"2026-02-23T15:55:55+00:00","article_modified_time":"2026-02-23T15:55:56+00:00","og_image":[{"url":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-1024x559.png","type":"","width":"","height":""}],"author":"radoslaw.obuchowicz","twitter_card":"summary_large_image","twitter_misc":{"Napisane przez":"radoslaw.obuchowicz","Szacowany czas czytania":"9 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#article","isPartOf":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en"},"author":{"name":"radoslaw.obuchowicz","@id":"https:\/\/bioeducator.eu\/#\/schema\/person\/fdd8b0df5f6951b44d42ab42ade1beec"},"headline":"Do You calculate Linearity properly?","datePublished":"2026-02-23T15:55:55+00:00","dateModified":"2026-02-23T15:55:56+00:00","mainEntityOfPage":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en"},"wordCount":875,"commentCount":0,"publisher":{"@id":"https:\/\/bioeducator.eu\/#organization"},"image":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage"},"thumbnailUrl":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png","articleSection":["Brak kategorii"],"inLanguage":"pl-PL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bioeducator.eu\/?p=2086&lang=en#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en","url":"https:\/\/bioeducator.eu\/?p=2086&lang=en","name":"Do You calculate Linearity properly? - Bioeducator.eu","isPartOf":{"@id":"https:\/\/bioeducator.eu\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage"},"image":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage"},"thumbnailUrl":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png","datePublished":"2026-02-23T15:55:55+00:00","dateModified":"2026-02-23T15:55:56+00:00","description":"R squared = 0.999? The method may still be non-linear. Residual analysis will help you check whether your regression model is correct.","breadcrumb":{"@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bioeducator.eu\/?p=2086&lang=en"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#primaryimage","url":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png","contentUrl":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2026\/02\/Analiza-resztkowa_okladka-scaled.png","width":2560,"height":1396},{"@type":"BreadcrumbList","@id":"https:\/\/bioeducator.eu\/?p=2086&lang=en#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/bioeducator.eu\/"},{"@type":"ListItem","position":2,"name":"Do You calculate Linearity properly?"}]},{"@type":"WebSite","@id":"https:\/\/bioeducator.eu\/#website","url":"https:\/\/bioeducator.eu\/","name":"Bioeducator.eu","description":"","publisher":{"@id":"https:\/\/bioeducator.eu\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bioeducator.eu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/bioeducator.eu\/#organization","name":"Bioeducator.eu","url":"https:\/\/bioeducator.eu\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/bioeducator.eu\/#\/schema\/logo\/image\/","url":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2025\/03\/Bioeducator_logo_poziom.png","contentUrl":"https:\/\/bioeducator.eu\/wp-content\/uploads\/2025\/03\/Bioeducator_logo_poziom.png","width":3910,"height":935,"caption":"Bioeducator.eu"},"image":{"@id":"https:\/\/bioeducator.eu\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/bioeducator.eu\/#\/schema\/person\/fdd8b0df5f6951b44d42ab42ade1beec","name":"radoslaw.obuchowicz","image":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/bioeducator.eu\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fcbdc1450632bf52b5257736b7b7ea5b6781f6b5ebf9cd50c06b709c3b220846?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fcbdc1450632bf52b5257736b7b7ea5b6781f6b5ebf9cd50c06b709c3b220846?s=96&d=mm&r=g","caption":"radoslaw.obuchowicz"},"sameAs":["http:\/\/bioeducator.eu"],"url":"https:\/\/bioeducator.eu\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/posts\/2086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2086"}],"version-history":[{"count":9,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/posts\/2086\/revisions"}],"predecessor-version":[{"id":2104,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/posts\/2086\/revisions\/2104"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=\/wp\/v2\/media\/2082"}],"wp:attachment":[{"href":"https:\/\/bioeducator.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bioeducator.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}