deepsense.ai
  • Careers
    • Job offers
    • Summer internship
  • Clients’ stories
  • Services
    • AI software
    • Team augmentation
    • AI advisory
    • Train your team
  • Industries
    • Retail
    • Manufacturing
    • Financial & Insurance
    • IT operations
    • TMT & Other
    • Medical & Beauty
  • Knowledge base
    • Blog
    • R&D hub
  • About us
    • Our story
    • Management
    • Advisory board
    • Press center
  • Contact
  • Menu Menu
What color car is the fastest?

What color car is the fastest?

April 16, 2015/in Data science /by Przemyslaw Biecek

RECOMB 2015, a conference devoted to computational molecular biology (with emphasis on computational), came to an end yesterday. Many interesting papers were presented, yet this post was inspired by a conversation that I had the pleasure to have during dinner break.

800px-2012_NAIAS_Red_Porsche_991_convertible_(world_premiere)

We were discussing statistical relationships; one thought led to another until we reached a hypothesis that the fastest cars are red (obviously we did not mean that color has any influence on speed but rather we entertained the idea that the relation results from color and engine power-related preferences of car owners). I had my doubts but my interlocutor was rather strongly convinced of the truth of the hypothesis. As would be expected of men believing in data, we decided to explore this issue.
A package called PogromcyDanych includes a data set auta2012 with information about around 200 thousand offers for sale of cars published in 2012. Most offers specified the color and power engine of the car.
All right, let us then check what color cars have the highest engine power.
We will calculate power median breaking cars into color groups.

library(PogromcyDanych)
# this function converts polish variable names to english ones
setLang()
auta2012 %.%
group_by(Color) %.%
summarise(mKM = median(HP, na.rm=T)) %.%
arrange(-mKM) %.%
slice(1)

Hmm, white?
I did not associate this color with high speed.
Maybe we make a mistake when we calculate medians for each color separately? Maybe it would be better to check how powerful are the most powerful white cars instead of calculating the average engine power for the whole group?
Let’s see what will be the result if we choose the 90th percentile instead of median.

auta2012 %.%
group_by(Color) %.%
summarise(mKM = quantile(HP, .9, na.rm=TRUE)) %.%
arrange(-mKM) %.%
slice(1)

White metallic?
It seems that the greatest number of cars with a very high engine power can be found in the group of white cars.
But the other thing is that many of the fast white cars are also relatively old. Maybe we should analyze old and new cars separately?
We will calculate then what is the fastest color for each production year and then we will be able to check which color dominates most often.

auta2012 %.%
filter(Color!="") %.%
group_by(Color, Year) %.%
summarise(median_KM = quantile(HP, 0.9, na.rm=T),
count = n()) %.%
filter(count>20) %.%
group_by(Year) %.%
arrange(-median_KM) %.%
slice(1) %.%
group_by() %.%
arrange(-Year) %.%
as.data.frame()
## Color Year median_KM count
## 1 black 2012 396.0 22
## 2 white-metallic 2011 317.2 411
## 3 grey 2010 435.0 58
## 4 white-metallic 2009 290.8 139
## 5 grey 2008 321.8 59
## 6 grey 2007 314.5 50
## 7 white-metallic 2006 279.0 73
## 8 white-metallic 2005 311.4 68
## 9 black 2004 232.7 343
## 10 black 2003 220.0 299
## 11 brown-metallic 2002 199.0 51
## 12 brown-metallic 2001 240.4 43
## 13 black-metallic 2000 194.7 1058
## 14 brown-metallic 1999 214.4 39
## 15 brown-metallic 1998 203.0 29
## 16 graphite-metallic 1997 194.4 156
## 17 black-metallic 1996 187.5 251
## 18 black-metallic 1995 218.0 188
## 19 navy-metallic 1994 220.0 27
## 20 silver-metallic 1993 231.0 88
## 21 black-metallic 1992 217.3 102
## 22 black-metallic 1991 218.2 64
## 23 black-metallic 1990 310.0 44
## 24 black-metallic 1989 203.4 21
## 25 black 1988 246.0 23
## 26 white 1987 136.0 21

The list presented above is dominated by three colors; black, white and grey. Red is completely absent.
But let us check also what color is the most popular among cars with engine power exceeding 500 hp.

auta2012[auta2012$HP > 500,"Color"] %.%
table() %.%
sort() %.%
tail(1)

Black metallic.
Looking at the data we have to admit that the cars with most powerful engines are not red at all but rather black, grey or white.
Przemyslaw Biecek

Share this entry
  • Share on Facebook
  • Share on Twitter
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://deepsense.ai/wp-content/uploads/2019/02/What-color-car-is-the-fastest.jpg 337 1140 Przemyslaw Biecek https://deepsense.ai/wp-content/uploads/2019/04/DS_logo_color.svg Przemyslaw Biecek2015-04-16 06:30:482021-01-05 16:54:15What color car is the fastest?

Start your search here

NEWSLETTER SUBSCRIPTION

    You can modify your privacy settings and unsubscribe from our lists at any time (see our privacy policy).

    This site is protected by reCAPTCHA and the Google privacy policy and terms of service apply.

    THE NEWEST AI MONTHLY DIGEST

    • AI Monthly Digest 20 - TL;DRAI Monthly Digest 20 – TL;DRMay 12, 2020

    CATEGORIES

    • Elasticsearch
    • Computer vision
    • Artificial Intelligence
    • AIOps
    • Big data & Spark
    • Data science
    • Deep learning
    • Machine learning
    • Neptune
    • Reinforcement learning
    • Seahorse
    • Job offer
    • Popular posts
    • AI Monthly Digest
    • Press release

    POPULAR POSTS

    • AI trends for 2021AI trends for 2021January 7, 2021
    • A comprehensive guide to demand forecastingA comprehensive guide to demand forecastingMay 28, 2019
    • What is reinforcement learning? The complete guideWhat is reinforcement learning? deepsense.ai’s complete guideJuly 5, 2018

    Would you like
    to learn more?

    Contact us!
    • deepsense.ai logo white
    • Services
    • Customized AI software
    • Team augmentation
    • AI advisory
    • Knowledge base
    • Blog
    • R&D hub
    • deepsense.ai
    • Careers
    • Summer internship
    • Our story
    • Management
    • Advisory board
    • Press center
    • Support
    • Terms of service
    • Privacy policy
    • Code of ethics
    • Contact us
    • Join our community
    • facebook logo linkedin logo twitter logo
    • © deepsense.ai 2014-
    Scroll to top

    This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

    OKLearn more

    Cookie and Privacy Settings



    How we use cookies

    We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

    Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

    Essential Website Cookies

    These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

    Because these cookies are strictly necessary to deliver the website, refuseing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

    We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

    We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

    Other external services

    We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

    Google Webfont Settings:

    Google Map Settings:

    Google reCaptcha Settings:

    Vimeo and Youtube video embeds:

    Privacy Policy

    You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

    Accept settingsHide notification only