How can I perform logarithmic regression in Google Sheets? 2

How can I perform logarithmic regression in Google Sheets?

Logarithmic regression is a statistical method used to analyze data that follows a logarithmic pattern. In Google Sheets, this can be achieved by using the built-in function “LOGEST” which calculates the best-fit logarithmic line of a given data set. To perform logarithmic regression in Google Sheets, first, organize your data into two columns (x and y values). Next, select the cells containing the data and click on the “Insert” tab, then select “Chart” and choose “Scatter” from the options available. After the chart is created, right-click on any data point and select “Add Trendline.” In the “Trendline” tab, choose “Logarithmic” as the trendline type. This will display the equation of the logarithmic line on the chart and the corresponding “r-squared” value, indicating the strength of the relationship between the variables. This method can be useful for analyzing data with non-linear relationships and making predictions based on the trendline equation.

Perform Logarithmic Regression in Google Sheets


Logarithmic regression is a type of regression used to model situations where growth or decay accelerates rapidly at first and then slows over time.

For example, the following plot demonstrates an example of logarithmic decay:

For this type of situation, the relationship between a predictor variable and a could be modeled well using logarithmic regression.

The equation of a logarithmic regression model takes the following form:

y = a + b*ln(x)

where:

  • y: The response variable
  • x: The predictor variable
  • a, b: The regression coefficients that describe the relationship between x and y

The following step-by-step example shows how to perform logarithmic regression in Google Sheets.

Step 1: Create the Data

First, let’s create some fake data for two variables: x and y:

Step 2: Take the Natural Log of the Predictor Variable

Next, we need to create a new column that represents the natural log of the predictor variable x:

Step 3: Fit the Logarithmic Regression Model

Next, we’ll fit the logarithmic regression model.

=LINEST(B2:B16,C2:C16)

Once you press Enter, the coefficients of the logarithmic regression model will be shown:

logarithmic regression in Google Sheets

Using the coefficients from the output, we can see that the fitted logarithmic regression equation is:

y = 63.0686 – 20.1987 * ln(x)

We can use this equation to predict the response variable, y, based on the value of the predictor variable, x.

For example, if x = 12, then we would predict that y would be 12.87:

y = 63.0686 – 20.1987 * ln(12) = 12.87

Bonus: Feel free to use this online to automatically compute the logarithmic regression equation for a given predictor and response variable.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Cite this article

stats writer (2024). How can I perform logarithmic regression in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-perform-logarithmic-regression-in-google-sheets/

stats writer. "How can I perform logarithmic regression in Google Sheets?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-perform-logarithmic-regression-in-google-sheets/.

stats writer. "How can I perform logarithmic regression in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-perform-logarithmic-regression-in-google-sheets/.

stats writer (2024) 'How can I perform logarithmic regression in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-perform-logarithmic-regression-in-google-sheets/.

[1] stats writer, "How can I perform logarithmic regression in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I perform logarithmic regression in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top