Sitemap
Giancarlo Vercellino

Giancarlo Vercellino

Giancarlo Vercellino is Associate Director Research & Consulting at IDC Italy, managing advisory, research and consulting services for IT/ TLC customers

Null Hypothesis #1

2 min readSep 4, 2021

--

Hypothesis

“Americans and Russians have different viewing habits on YouTube”.

Dataset

Trending YouTube Video Statistics, including

  • 40949 trending videos from US published between 2006–07–23 and 2018–06–14, and
  • 40739 trending videos from RU published between 2011–06–20 and 2018–06–14.

Source: Kaggle, https://www.kaggle.com/datasnaek/youtube-new

Analysis

A little cross-tabulation.

  table(videos$category, videos$nation)                          RU    US

Autos & Vehicles 1583 384
Comedy 3065 3457
Education 714 1656
Entertainment 5943 9964
Film & Animation 3041 2345
Gaming 1043 817
Howto & Style 2000 4146
Movies 1 0
Music 1895 6472
News & Politics 5402 2487
Nonprofits & Activism 0 57
People & Blogs 10350 3210
Pets & Animals 604 920
Science & Technology 1133 2401
Shows 194 57
Sports 1968 2174
Travel & Events 262 402

Removing two categories with zeroes (“Movies” and “Nonprofits & Activism”) to avoid errors with Chisq Test.

Get Giancarlo Vercellino’s stories in your inbox

Join Medium for free to get updates from this writer.

Selecting the same time frame both for RU and US trending videos (that is the window from 2011–06–20 to 2018–06–14).

time_index <- as.Date(videos$publish_time) < as.Date(tail(RUvideos$publish_time, 1)) & as.Date(videos$publish_time) > as.Date(head(RUvideos$publish_time, 1))excluded <- c("Movies", "Nonprofits & Activism")
category_index <- !(videos$category %in% excluded)
table(videos$category[category_index & time_index], videos$nation[category_index & time_index]) RU US
Autos & Vehicles 1557 347
Comedy 3031 3402
Education 704 1593
Entertainment 5866 9743
Film & Animation 3007 2261
Gaming 1022 806
Howto & Style 1979 4086
Music 1876 6319
News & Politics 5345 2414
People & Blogs 10182 3132
Pets & Animals 596 904
Science & Technology 1112 2321
Shows 191 57
Sports 1948 2107
Travel & Events 253 391

Let’s do the test.

chisq.test(videos$nation[category_index & time_index], videos$category[category_index & time_index])Pearson's Chi-squared testdata:  videos$nation[category_index & time_index] and videos$category[category_index & time_index]
X-squared = 10791, df = 14, p-value < 2.2e-16

Comment

American’s and Russian’s trending videos on YouTube show possibly different viewing habits (Pearson’s Chi-squared test: p-value < 2.2e-16; the p-value significance does not fade even removing extreme quantiles of video views): it seems that Americans have a prevalent interest on Education, Entertainment, Howto & Style, Music, Pets & Animals, Travel & Events, while Russians have a prevalent interest on Autos & Vehicles, Film & Animation, Gaming, News & Politics, People & Blogs, Shows. In many cases, the differences between the two groups are remarkable.

Next

In the next issue of Null Hypothesis, we will go deep into the rabbit hole comparing the different viewing habits between Americans and Russians with reference to News & Politics. Scary!

--

--

Giancarlo Vercellino
Giancarlo Vercellino

Giancarlo Vercellino is Associate Director Research & Consulting at IDC Italy, managing advisory, research and consulting services for IT/ TLC customers