<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz" -->

---
title: Grubbs’ Test in R: grubbs.test() Explained with a Real...
description: Explains how to use the grubbs.test() function from R's outliers package to detect a single outlier in a dataset, using the built-in mtcars dataset as a worked...
canonical: https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Grubbs’ Test in R: grubbs.test() Explained with a Real Example | daily.dev
og:description: Explains how to use the grubbs.test() function from R's outliers package to detect a single outlier in a dataset, using the built-in mtcars dataset as a worked...
og:url: https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz
og:image: https://api.daily.dev/og/posts/ZWZKDLdSZ.png
og:image:alt: Grubbs’ Test in R: grubbs.test() Explained with a Real Example
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Grubbs’ Test in R: grubbs.test() Explained with a Real Example

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 1 min read · 0 upvotes · 0 comments

## Summary

Explains how to use the grubbs.test() function from R's outliers package to detect a single outlier in a dataset, using the built-in mtcars dataset as a worked example. Covers the statistical output (G statistic, U, p-value), when Grubbs' test is appropriate to apply, and what steps to take after a value is flagged as an outlier.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/09/grubbs-test-in-r-grubbs-test-explained-with-a-real-example>

## Similar posts on daily.dev

- [Z-Test in R: Complete Guide with One-Sample & Two-Sample Examples](https://daily.dev/posts/z-test-in-r-complete-guide-with-one-sample-two-sample-examples-se7ibtcpr) · R-bloggers · 0 upvotes · 0 comments
- [Cochran’s Q test in R, or the extension of McNemar’s test for more than two groups](https://daily.dev/posts/cochran-s-q-test-in-r-or-the-extension-of-mcnemar-s-test-for-more-than-two-groups-usp4hlaey) · R-bloggers · 0 upvotes · 0 comments
- [Is Fisher’s exact test always the best choice for 2×2 tables?](https://daily.dev/posts/is-fisher-s-exact-test-always-the-best-choice-for-2-2-tables--6damrptaq) · Medium · 0 upvotes · 0 comments
- [A Case for the T-statistic](https://daily.dev/posts/a-case-for-the-t-statistic-w43tf9ozz) · Towards Data Science · 0 upvotes · 0 comments

---

Tags: [#data-science](https://daily.dev/tags/data-science), [#r](https://daily.dev/tags/r), [#statistics](https://daily.dev/tags/statistics)

[View this post on daily.dev](https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Grubbs’ Test in R: grubbs.test() Explained with a Real Example","url":"https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz"},"datePublished":"2026-09-15T19:52:16.330Z","dateModified":"2026-09-15T19:52:30.722Z","description":"Explains how to use the grubbs.test() function from R's outliers package to detect a single outlier in a dataset, using the built-in mtcars dataset as a worked...","image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","thumbnailUrl":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/grubbs-test-in-r-grubbs-test-explained-with-a-real-example-zwzkdldsz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"data-science,r,statistics","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"Grubbs’ Test in R: grubbs.test() Explained with a Real Example"}]}
```

