When we inspect and summarize data, look for patterns, and use what we find to decide what to investigate next, we are performing exploratory data analysis.
Types of EDA questions we’ll examine:
What variation occurs within a variable?
What covariation occurs between variables?
What unusual values or outliers exist within the data?
Today’s dataset
7,072 movies on IMDb that have at least 25,000 votes. Each row is a movie.
imdb_rating is the score that IMDb publishes.
The data are in wide form.
Warmup 1: Find a movie you know
Find your favorite recent film. Submit its title, year, total votes, and IMDb rating. Use backticks for column names with spaces, such as Total ratings.
Report your film’s title, release year, total votes, and IMDb rating.
Warmup 2: Which movies attracted the most votes?
Find the five most-voted movies released in 2023. Show title and total votes.
Which five movies released in 2023 have the most votes? Report their titles and vote counts.
Warmup 3: Percentage of one-star votes
For movies released in 2023, calculate the percentage of votes that are one star. Find the five highest percentages.
Write your pipeline a step at a time. Run it to inspect the results; click Run Code to request checklist feedback.
Keep only movies released in 2023.
Calculate each movie’s percentage of one-star ratings.
Order movies from highest to lowest one-star percentage.
Print info for the five highest one-star percentage movies.
Questions for today
Where do most movie scores fall?
Which movies have the largest gap between their raw average and IMDb score?
Do older movies have higher ratings?
What are we plotting?
One row is a movie. This extract has 7,072 movies, each with over 25,000 votes.
imdb_rating is IMDb’s published score.
Marginal and joint distributions
A marginal distribution describes one variable: e.g., the distribution of IMDb scores.
A joint distribution describes two variables together: e.g., IMDb scores vs decade of release.
A conditional distribution restricts the comparison to a group: e.g., IMDb scores among movies from the 1990s.
One continuous variable
Where do most movies fall?
A histogram visualizes the variation within a single continuous variable.
Does this plot look good to you? Is it informative? Describe a way you could make it better.
How much detail do we want?
Vary the number of bins in the histogram – what changes? Which setting would you choose to use and why?
Improving the plot
All plots should have:
A descriptive title and labeled axes, with clear units.
Clear representation of the data (e.g., appropriate bin width for histograms).
Sourcing/attribution.
Improve this histogram using the guidelines above. (If you don’t know how to do it, use the ? button to tell AI how you want the plot to look, and paste the resulting code.) Run your code, then submit your plot. We will look at some of the plots together.
One discrete variable
How many movies came from each decade?
Visualizing the decades
A bar plot visualizes the variation within a single discrete variable.
Let’s see how many movies came from each decade.
We first need to turn a year such as 1997 into its decade, 1990s.
Count the films in each decade
Use cut() inside mutate() to group Year into decades, then count the movies in each decade.
Bar chart of films by decade
Improve this bar chart with better labels, titles, sourcing, etc. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
Two continuous variables
IMDb publishes a score and vote counts for each movie. Does the average computed from those counts agree with IMDb’s score?
Estimating the average rating
Using what we have learned so far, we want to be able to write:
Describe in words how we can make the imdb table look like this – what is the name of the operation we should perform? If there are 7,072 movies and ten rating levels, how many rows should the new table have?
Gathering columns with pivot_longer()
To reshape data from wide to long, we have to specify:
which columns to gather,
where their names go,
and where their values go.
First try: average the rating column
We have a rating column now. Let’s try averaging it:
What went wrong? Why does mean(rating) return NA instead of an average?
Text vs numeric
pivot_longer() copied the old column names into rating. Column names are text, so rating is a character column.
Look for <chr> beside rating and <dbl> beside votes.
Numeric: quantities 1 < 2 < 10 We can average these numbers.
What does a data type tell R?
The type determines how R stores values and which operations make sense.
Character: text such as a movie title or "10 ratings".
Numeric: quantities such as a vote count or mean rating.
Logical:TRUE or FALSE, such as the result of Year == 2023.
Compare a number with its text representation:
Turn rating labels into numbers
parse_number(txt) tries to extract a number from a piece of text.
as.numeric() handles plain numeric text such as "10", but not a label such as "10 ratings".
Which average do we want?
Suppose three people gave 2 stars and one person gave 10 stars.
What would small_votes |> summarize(mean(rating)) produce? What is the actual average across the four people? Explain why the answers differ.
Computing a weighted average
weighted.mean(rating, votes) multiplies each rating by its vote count, adds the products, and divides by total votes.
We now have one row per movie and both scores needed for the scatterplot.
How closely do the two scores agree?
A scatterplot visualizes the covariation between two continuous variables. Each point represents a movie with both a raw average and an IMDb score.
Improve this scatterplot: add a descriptive title, labeled axes, and a source. Make overlapping points easier to see. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
Show where the scores agree
The line y = x marks movies with the same score under both calculations. alpha makes points transparent, helping us see where movies overlap.
Read the scatterplot
What does a point above or below the 45-degree line tell us about its two scores? Why might such discrepancies occur?
Which movies stand out?
An outlier is an observation that differs substantially from the pattern in the rest of the data.
Here, most movies lie near the agreement line.
Movies far from that line have unusually large differences between their scores.
Find the biggest discrepancy
Start with all movies in movie_means and calculate gap as mean_rating minus imdb_rating.
Order movies by the absolute value of gap, largest first.
Keep the movie with the largest absolute gap.
Show its title, release year, computed mean rating, IMDb rating, and gap.
The largest discrepancy: Martin (2024)
Martin (2024)
The mean computed from votes is 8.42; IMDb’s score is 2.2.
One discrete and one continuous variable
Do older movies have higher ratings?
Average IMDb rating by decade
Group the movies by decade.
Summarize into one row per decade, including the number of movies as n_movies.
Calculate avg_rating as the mean of imdb_rating within each decade, giving every movie equal weight.
What does the average leave out?
Movies from the same decade can have very different ratings.
Two decades could have the same average but different spreads.
We want to compare the distributions of ratings within decades.
A boxplot summarizes a numerical variable within each category.
Interpreting a boxplot
Whiskers end at the most extreme observations within 1.5 IQR of the box. Points beyond them are shown individually; they are not necessarily errors.
IMDb ratings by decade
imdb_decade contains one row per movie, with its decade already added. decade_counts contains one row per decade and its movie count.
In boxplot(), imdb_rating ~ decade means “show the distribution of IMDb ratings separately for each decade.” data supplies the table.
Improve this boxplot: add a descriptive title, labeled axes, readable decade labels, and a source. Keep the decades in chronological order. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
Plotting data over time
The boxplots suggest that ratings differ across release decades. Does the pattern change gradually, or are there particular years that stand out?
We will calculate the mean IMDb rating for each year and plot it over time.
Build a table with one row per year
Build your pipeline and click Run Code to check your progress.
Group all movies in imdb by release Year.
Summarize into one row per year, with avg_rating equal to the mean of imdb_rating, giving each movie equal weight.
Include n_movies, the number of movies in each year.
Save the result as yearly_ratings and display the first few rows.
Plot the mean IMDb rating by release year
Add confidence whiskers for the mean
A mean based on fewer movies is (usually) less precise. Its standard error is sd(imdb_rating) / sqrt(n()).
Explaining the trend
This file includes only movies with at least 25,000 votes. Which older movies are likely to reach that threshold today? Which might be missing? How does this selection process affect the trend in average ratings over time?
The following slides preserve what students submitted during class. No names or login information are included.
CLASS RECORD · QUESTION 1 · 1/2
Report your film's title, release year, total votes, and IMDb rating.
71 anonymous responses
Plain answer with film details31Directly gives a film title and release year without the other requested numeric metadata.
Partial numeric metadata included14Provides a film title with some numeric information (e.g., ratings count) but omits one or more requested fields or leaves the response incomplete.
Title with implausible future year8Provides a film title paired with a year that appears to be a future or unlikely release year, suggesting an error or speculation.
Nonresponse or misspelling7Responses that do not provide the requested film metadata and appear incomplete or contain typos rather than an answer.
CLASS RECORD · QUESTION 1 · 2/2
Response themes for question 1
Code-style data-selection expression3Uses a code/filter expression intended to extract title, year, total ratings, and IMDb rating from a dataset rather than supplying the values directly.
Title only, ambiguous punctuation3Gives only a film title (possibly with trailing punctuation) without year or numeric metadata.
Vague placeholder response3Noninformative reply that neither names a film nor supplies requested metadata.
Other responses2
QUESTION 1 · Plain answer with film details · 1/4
Student responses
10 Things I hate about you (1999)
Avatar, released in 2009
Baby Driver, 2017. The other two categories are not loading properly
Barbie 2023
Barbie tt1517268 2023
Barbie, 2023, 45 total ratings
Barbie, 2025
batman
Braveheart, 1995, I cant see the other 2
QUESTION 1 · Plain answer with film details · 2/4
Student responses
cars, 2006 7.3
cars, 2006,
Dune, 1984
fast and furious, 2009
Gensis, 2021
Good Will Hunting 1997
I chose The Lego Batman Movie and the year is 2017, total votes is 2000
Inception
Moneyball, 2011
QUESTION 1 · Plain answer with film details · 3/4
Student responses
Moneyball, 2011, 1 ratings of 2169 2ratings of 1044
Mortal Engines; 2018; can't yet see the rest
Oppenheimer, 2023, 10767
Shrek, 2001
Spiderman, 2002, 200
The film's title is Cars, release year is 2006, total ratings is some amount, and the imdb_rating is also some amount.
The Prestige, 2006, 8.5 imdb
The title is "The Arrival", it came out in 1996 and its rating is 4000 5 stars on IMDB
The title of the film is Bottoms, it was released in 2023 and has over 5,000 ratings
QUESTION 1 · Plain answer with film details · 4/4
Student responses
Titanic, 1997,
Titanic, 1997.
whiplash, 2014
Zootopia is released in 2016
QUESTION 1 · Partial numeric metadata included · 1/2
Student responses
[REC] 3: Genesis, released year 2012, total ratings
2014, 18570
7.8
Crazy rich asians was release in 2018 and has
Film Title is Cars, Year 2006, total votes 10251, imdb rating is dbl
I chose 10 things i hate about you. it couldn't gine
QUESTION 1 · Title only, ambiguous punctuation · 1/1
Student responses
Alice in Wonderland, forgrt the time but the Disney rdition with real characters
Baby driver has 9000 1 stars and
Interstellar,
QUESTION 1 · Vague placeholder response · 1/1
Student responses
a
I couldn't find mine, but ill try another
something
CLASS RECORD · QUESTION 2 · 1/3
Which five movies released in 2023 have the most votes? Report their titles and vote counts.
64 anonymous responses
Minimal non-informative reply12Very short, non-descriptive responses that do not convey a procedure or answer.
Opaque single-character reply11Extremely brief, non-informative responses consisting of a single character or similarly opaque content.
Bare list of movie title guesses9Provides an unordered list of likely 2023 movie titles without vote counts or methodology.
R/dplyr data-filtering approach9Provides an R pipeline using dplyr-like verbs to filter for 2023, sort by total ratings descending, take the top five, and select title and ratings.
CLASS RECORD · QUESTION 2 · 2/3
Response themes for question 2
Incorrect numeric movie-votes list7Gives a list of movie titles paired with vote counts that appear inconsistent or unlikely for 2023 releases, suggesting incorrect data or formatting.
Malformed code/data-manipulation attempt6Attempts to express a filtering and sorting pipeline but with syntax errors or mixed function names; intent is to filter for 2023 and take top five by votes.
Commented R pipeline with minor errors5An R/dplyr-style pipeline written with inline comments and slight logical mistakes (e.g., using >= for year or misusing count), aiming to filter for 2023, sort by votes, and select top five.
CLASS RECORD · QUESTION 2 · 3/3
Response themes for question 2
Irrelevant single-word or junk reply5One-word or short nonspecific responses that do not relate to the requested data or procedure.
QUESTION 2 · Minimal non-informative reply · 1/2
Student responses
.
a
b
I cound' tfind it
I did not quite get there, but
I wasnt able to find it
idk
n
Not enough time
QUESTION 2 · Minimal non-informative reply · 2/2
Student responses
Not sure
something
x
QUESTION 2 · Opaque single-character reply · 1/2
Student responses
12th fail
12th Fail, 20 Days in Marioupul 65, A good Person, and a haunting in Venice
12th Fail, 20 Days in..., 65, a good person, and a haunting... are the most rated movies, each with over 25,000 vote counts.
A huanting in Venice, 65, 12th fail
Air 191293
Paradise (25011), Gadar 2 (25235), The Vaccine War (25360), Taylor Swift: The Eras Tour (25471), Hi Nanna (25480)
Q
spiderman
the movies in 2023
QUESTION 2 · Opaque single-character reply · 2/2
Student responses
unable to arrange by Total ratings due to there being a space in the name
waht is a vote
QUESTION 2 · Bare list of movie title guesses · 1/1
Student responses
Barbie
im getting an error here: arrange(desc(Total_ratings)
Oppenheimer Barbie Spider-Man John wick and guardians of the gakaxy
oppenheimer barbie Spiderman Guardians John Wick
Oppenheimer, BArbie, Spider man across the spider verse, guardians od the galaxy 3, john wick 4
Oppenheimer, Barbie, Spider-Man: Across the Spider-Verse, Guardians of the Galaxy Vol 3, John Wick
Oppenheimer, barbie, spiderman, guardians, john wick
imdb |> # fold: [Keep movies released in 2023] filter(year = 2023) |> # endfold # fold: [Sort from most votes to fewest] arrange(desc(votes) |> # endfold # fold: [Keep the first five movies and the requested columns] slice_head(n = 5) |> select(Title, `Total ratings`)
Oppenheimer, 990010; Barbie, 654761; Spider-Man: Across the Spider-Verse, 502557; Guardians of the Galaxy Vol. 3, 459179; John Wick: Chapter 4, 402472
spiderman
unable to: # fold: [Keep movies released in 2023] filter(Year == 2023) |> # endfold # fold: [Sort from most votes to fewest] arrange(desc(Total_ratings)) |> # endfold # fold: [Keep the first five movies and the requested columns] slice_head(n = 5) |> select(Title, `Total ratings`) # endfold
QUESTION 2 · Incorrect numeric movie-votes list · 1/1
Student responses
1 12th Fail 165920 2 20 Days in Mariupol 42811 3 65 104506 4 A Good Person 28382 5 A Haunting in Venice 138786
12th Fail (165920) 20 days in Mariupol (42811) 65 (104506) A good person (28382) A haunting in Veince (138786)
12th fail (165920), 20 Days in Mariupol (42811). 65 (104506).A good person (28382), haunting in venice(138786)
12th Fail 160000
itle `Total ratings` <chr> <dbl> 1 Adipurush 136863 2 Winnie-the-Pooh: Blood and Honey 36335 3 Kisi Ka Bhai Kisi Ki Jaan 41900 4 The Archies 53481 5 Peter Pan & Wendy 30169
oppenheimer 990010, barbie 654761, spiderman across the spiderverse 502557, guardians of the galaxy vol 3 459179, john wick chapter four 402472
The five most-voted movies released in 2023 were Oppenheimer (990,010 votes), Barbie (654,761), Spider-Man: Across the Spider-Verse (502,557), Guardians of the Galaxy Vol. 3 (459,179), and John Wick: Chapter 4 (402,472).
imdb |> # fold: [Keep movies released in 2023] filter("Year" == "2023") |> # endfold # fold: [Sort from most votes to fewest] arrange(Total ratings) |> # endfold # fold: [Keep the first five movies and the requested columns] slice_head(n = 5) |> select(Title, `Total ratings`)
is this right? 12th Fail 165920 2 20 Days in Mariupol 42811 3 65 104506 4 A Good Person 28382 5 A Haunting in Venice 138786
Oppenheimer, Barbie, Spiderman, Guardians of the galaxy 3, John Wick ch4; 990010, 654761, 502557, 459179, 402472
Paradise Gadsden 2 vaccine war Taylor swift and hi nanna
QUESTION 2 · Commented R pipeline with minor errors · 1/1
Student responses
12th fail, 20 days in Mariupol, 65, a good person, a haunting in Venice but I think it's not properly sorting by votes
12th fail, 20 days, 65, adipurush, air
12th Fail: 165920, 20 Days in Mariupol:
imdb |> # fold: [Keep movies released in 2023] filter(year == 2023) |> # endfold # fold: [Sort from most votes to fewest] arrange(desc(votes)) |> # endfold # fold: [Keep the first five movies and the requested columns] slice_head(n = 5) |> select(Title, `Total ratings`)
imdb |> # fold: [Keep movies released in 2023] filter(year >= 2023) |> # endfold # fold: [Sort from most votes to fewest] arrange(count(votes)) |> # endfold # fold: [Keep the first five movies and the requested columns] slice_head(n = 5) |> select(Title, `Total ratings`)
QUESTION 2 · Irrelevant single-word or junk reply · 1/1
Student responses
5 movies released in 2023 total votes
5 movies released in are
Gensis
Paradise (25011), Gadar 2 (25235), The Vaccine War (25360), Taylor Swift: The Eras Tour (25471), Hi Nanna (25480)
revenges
CLASS RECORD · QUESTION 3
- Keep only movies released in 2023. - Calculate each movie's percentage of one-star ratings. - Order movies from highest to lowest one-star percentage. - Print info for the five highest one-star percentage movies.
imdb |>
# fold: [Keep movies released in 2023]
filter(Year == "2023") |>
# endfold
# fold: [Sort from most votes to fewest]
mutate(one_star_pct = '1 ratings' / 'Total ratings') |>
arrange(desc(one_star_pct)) |>
# endfold
# fold: [Keep the first five movies and the requested columns]
slice_head(n = 5) |>
select(Title, one_star_pct)
# endfold
imdb |>
# fold: [Keep movies released in 2023]
filter(Year == 2023) |>
mutate(one_star_pct = `1 ratings`/`Total ratings`)
arrange(desc("one_star_pct")) |>
slice_head(n = 5) |>
select(Title, one_star_pct)
imdb |>
# Step 1: Filter for 2023 releases with at least one vote
filter(year == 2023, total_votes > 0) |>
# Step 2: Calculate the one-star percentage
mutate(one_star_pct = (one_star_votes / total_votes) * 100) |>
# Step 3: Sort by percentage descending
arrange(desc(one_star_pct)) |>
# Step 4: Take the top 5 highest
slice_head(n = 5)
movies_2023 <- movies %>%
filter(year == 2023)
movies_pct_1star <- movies_2023 %>%
mutate(pct_1star = 100 * votes_1 / votes)
top_5_1star <- movies_pct_1star %>%
arrange(desc(pct_1star)) %>%
slice_head(n = 5)
top_5_1star
If you want it in one pipeline:
movies %>%
filter(year == 2023) %>%
mutate(pct_1star = 100 * votes_1 / votes) %>%
arrange(desc(pct_1star)) %>%
slice_head(n = 5)
CLASS RECORD · QUESTION 4 · 1/2
Does this plot look good to you? Is it informative? Describe a way you could make it better.
86 anonymous responses
Simple positive impression22Student expresses general approval of the plot without further detail.
Want subgrouping or temporal breakdown17Student feels the overall histogram hides important structure and suggests grouping by genre, year, director, or time periods to be more informative.
Recommend clearer axes and title12Student suggests improving axis limits, labels, or the chart title to increase clarity.
Informative but visually unappealing11Student finds the plot conveys information yet criticizes its visual design or attractiveness.
CLASS RECORD · QUESTION 4 · 2/2
Response themes for question 4
Title should be simpler or clearer10Student specifically notes the plot title is confusing or too cryptic and recommends making it simpler or clearer.
Suggest expand x-axis to show full range6Student recommends widening or rescaling the x-axis so the plot fills the row and displays the complete range of IMDb ratings.
Add mean/median or summary stats4Student suggests including statistical summaries such as the median and mean on the plot to convey central tendency.
Adjust bins or show distribution details4Student recommends changing histogram bin widths, scales, normalization, or bar widths to reveal distribution features or lower-rating detail.
QUESTION 4 · Simple positive impression · 1/3
Student responses
I feel like its informative as a baseline as you are initially diving into the data set. It doesn't give a ton of information outside of the fact that the average rating is around 7 and not many people give out super low scores.
i like this plot
I think it is good simple graph. To make it better, we could make the histogram units into smaller bars. like labeling by .5
I think this plot looks good because it shows the distribution of ratings, but I also don't know what movie this is referring to, so I'm not sure how useful it is.
it is good and infromative, it shows the distribution pretty well
It is informative
It looks alright, I'm just not quite sure of its usefulness. It tells us that the average rating for a movie is about 6.5 when it ideally should be 5. We could make it better by perhaps considering other variables to center the movie ratings around a more centered point of measurement.
It looks good and somewhat descriptive, but I would probably make the bin smaller to get a more accurate visual.
it looks good to me, but if the title and the x name can be edited it will look better.
QUESTION 4 · Simple positive impression · 2/3
Student responses
It looks good, maybe more ticks on the x-axis
it looks good. i think the x axis should be labeled more where there is data, and also have a more descriptive label than the code for what we are looking at
looks good, not super infomrtiave
Looks pretty good to me , the data are distributed as a mountain. Maybe give the lower data a little more space.
sounds good to me, how to improve
This graph looks fair to me, as its left skewed a bit, means the most users gave fairly high rates.
This plot is pretty informative since it's unimodal and we can see a clear center of IMDB ratings here.
This plot looks good to me. However, it loses some information. It could be better if we can specify the width of each bar so that we can tell what scores are contained in each bar.
To me it doesn't look too bad. I mean you got the rating on bottom and frequency on y. I think you could potentially have better labels like x is rating and y is number of votes. You could maybe also add color, or change the title. I would say maybe make a note that this is skewed right
QUESTION 4 · Simple positive impression · 3/3
Student responses
yes
Yes I do like the plot it gives a good idea of what ratings are more common than others
yes, informative
yes, pretty good, the bottom axis is formatted weird. Make it 1-10
QUESTION 4 · Want subgrouping or temporal breakdown · 1/3
Student responses
I just dont think this plot has many useful information outside the fact that the mean imbd score is around 6.5. i think maybe a more genre specific plot could be intrsting
I think the plot is informative. People tend to give a 6-8 rating to movies. I wonder if it could be more informative by breaking it down by movie genre.
It doesn't split up by time frame so it doesn't answer our question. We would need some sort of time frame and to see how the frequencies change.
It doesnt look the best because its hard to tell what rating is the best evn thougbwe know the rating os in between 6 and 8.
It is a left-skew curve. We may need more data to find out the information we need
It is fine if all you want to see is which imdb ratings are most common, but this type of graph tells us nothing about the movies themselves - release date, genre, etc - which could tell us more about why they were rated that way.
It looks good and could be informative but it would be better if you made different plots for different genres or with some other filter.
QUESTION 4 · Want subgrouping or temporal breakdown · 2/3
Student responses
It's informative but it doesn't show how ratings have changed over time
it's not good to me because i can only get total rating distribution for all movies in this plot, and really not much information for specific movies
No. This histogram covers every movie in the dataframe, which is not that informative
The bell shape is informative, but the data is left-skewed.
The plot is informative in a way that it shows the frequency of imdb ratings, so if someone just wanted to know the spread of them, this would be useful. However, it doesn't show the spread across years or anything else like that.
This plot is informative, but it could be better if you further sorted by genre, director, or year
This plot shows the imdb rating by frequency across all films, but is not very informative about how ir has changed over time. we could instead do a barchart separate by year to see how it changes over the years
While this plot shows the variation of ratings, if we want to answer the question of whether current ratings are lower than past ratings, we should group the data by periods in the histogram
QUESTION 4 · Want subgrouping or temporal breakdown · 3/3
Student responses
Yes it is not very skewed and looks very normally distributed
yes, shows the current maxima and bell curve trend, also indicates its skewed
QUESTION 4 · Recommend clearer axes and title · 1/2
Student responses
I like how the data looks on the plot but I would change the axis titles to make it look better and be more descriptive
I like the data in the plot, but it would be much more informative with better axis labels and a title that tells you exactly what the histogram is measuring
I think it looks fine. What could be helpful would be a title and axis label for x axis, and maybe the scale could have a few more numbers, or the bins for the histogram could be a bit smaller.
I would like more specific labels on the x axis
It doesn't look good and could be more informative. The first thing I would do is change the x-axis to imdb-ratings and the y-axis to number of movies or something similar.
It is a decent plot, but one way it could be improved would be if the axes were renamed and the title was more descriptive of the dataset we are pulling from.
It is informative, but we should change the titles to be more readable and we should change the bins to reflect the scores users can give. also, the x axis should be labled 1 -10
QUESTION 4 · Recommend clearer axes and title · 2/2
Student responses
It is somewhat informative because we can see that most movies have IMDb ratings around 6–8, with fewer very low ratings. However, the labels are not very clear. I would improve it by using a more descriptive title and changing the x-axis label from imdb$imdb_rating to “IMDb Rating.”
Make the title and x-axis a little cleaner
plot dosent look bad, ,aybe adjust axis and chart title?
The plot is somewhat informative, but we could label the x-axis and title so that the plot is more informative
this is an informative plot, but the upper and lower limits should be displayed to be more clear
QUESTION 4 · Informative but visually unappealing · 1/2
Student responses
I don't like the x axis label, I need it to be better worded. I also don't like how the x axis ticks are set up, I want to see ticks from maybe 0 to some value and that entire line to be longer.
It is informative, but can be better with more labeling.
It is informative, but doesn't look super good. Better titles would be good and maybe showing ratings all the way from 1-10 on the x axis
it seems informative but is not very visually pleasing
It shows the basic distribution and how the ratings are centered at around 7. Could be improved with some stats
It successfully shows an overall distribution of ratings but doesn't give any detailed information
no, the labels arent infomattive and there is no units
The plot looks alright. It doesn't communicate the variance as intended, though; perhaps a better title, along with a better scale would help.
The x-axis could be more detailed instead of just the even numbers (which don't even go up to the max rating). Same with the y-axis. The title and axes titles aren't descriptive either.
QUESTION 4 · Informative but visually unappealing · 2/2
Student responses
yeah that plot is pretty. maybe some colors could make it look prettier
Yes this plot looks good and I would say it is informative but its hard to see what the histogram is informing. So by changing the variables or th x and y axis would be better
QUESTION 4 · Title should be simpler or clearer · 1/2
Student responses
I think this plpot looks good to me it tells me the distrubtuion of imdmb ratings for all films is aroudn normal I think it could be better if it categorises or tells us more about the rating afo individual films
It could be better by decreasing the bin length to show the data better
It could be better by decreasing the bin size to show a more general trend.
It gives an overview of the dataset, but we want more specific number or central tendency.
Its not a bad plot and it displays the data well, however just displaying the ratings of all the movies is not incredibly informative
The frequency could be turned into percentage each bin
The plot is ok, it lets you know how freuqent the various numeric ratings are, it would be more informative if it was focused on a specific year, movie, or user
The title is too cryptic, I would make a more simple title
This plot is ok if you just wanted to see the distribution of all the ratings. However, since there is so much data it is hard to differentitate between the ratings and doesn't tell anything about how they differ over years
QUESTION 4 · Title should be simpler or clearer · 2/2
Student responses
This plot looks good to me as it shows the distribution of imdb ratings, but to make it better, we can add titles for each axis.
QUESTION 4 · Suggest expand x-axis to show full range · 1/1
Student responses
Expand the x-axis to fill the entire row so we can see the full range of IMDb ratings.
I like the plot because it shows the frequency of each movie rating, but a way it can be better is if you added what movie the rating corresponded to. The labels and titles could be improved
it is skewed
The plot is informative but could be constructed in a better way. The frist thing is to give actual labels to the x axis and the title of the graph. I would also alter the scale that is represented on the x-axis because it only goes to 8 but we have much more data that goes beyond 8. Bin size may need to be changed as well
This plot tells me only about what people vote overall for movies listed in imdb. It could be labeled better
We can make this plot better by defining the ranges that each bar covers. And we could also make the x axis wider so that it properly covers all of the data points
QUESTION 4 · Add mean/median or summary stats · 1/1
Student responses
could include median and mean
It could be divided into fewer groups, since you can only rate whole and half numbers.
It is not infomrative because we don't know which movie or even what genre, it is just a distribution of scores for all.
This plot is informative, but we can need to show what movies have those high/low ratings, a dot plot would be best here
QUESTION 4 · Adjust bins or show distribution details · 1/1
Student responses
not rly, dont know what for
The plot is somehwat informational as it shows that the ratings are left skewed and clustyered between 6-8, however the labels are not that great/confusing
This plot shows the frequency of different imdb ratings. The histogram is not normalized, so the data is off-center
You could change the bin sizes to better capture the lower ratings
CLASS RECORD · QUESTION 5
Vary the number of bins in the histogram -- what changes? Which setting would you choose to use and why?
0 anonymous responses
No responses were submitted.
CLASS RECORD · QUESTION 6
Improve this histogram using the guidelines above. (If you don't know how to do it, use the ? button to tell AI how you want the plot to look, and paste the resulting code.) Run your code, then submit your plot. We will look at some of the plots together.
65 anonymous responses
Other responses65
QUESTION 6 · Other responses · 1/8
Student responses
QUESTION 6 · Other responses · 2/8
Student responses
QUESTION 6 · Other responses · 3/8
Student responses
.
Added Title, changed breaks
Adding more labvels on the x access and in the tile, and add bins.
Changes the title and the label of the axis and picks the right number of bins
ggplot(movies, aes(x = imdb_rating)) + geom_histogram(binwidth = 0.5, boundary = 0, color = "white", fill = "steelblue") + labs( title = "Distribution of IMDb ratings for 7,072 movies", x = "IMDb rating (0 to 10)", y = "Number of movies", caption = "Source: movies dataset" )
ggplot(movies, aes(x = rating)) + geom_histogram(binwidth = 0.5, color = "black", fill = "skyblue") + labs( title = "Histogram of Movies vs. their Ratings", x = "Rating", y = "Number of Movies" )
ggplot(your_data, aes(x = imdb_rating)) + geom_histogram(binwidth = 5, fill = "steelblue", color = "white") + labs( title = "Distribution of imdb_rating" + theme_minimal()
ggplot(your_data, aes(x = your_variable)) + geom_histogram(binwidth = 2, color = "black", fill = "skyblue") + labs( title = "Distribution of your_variable", x = "your_variable (units)", y = "Count" )
QUESTION 6 · Other responses · 4/8
Student responses
help
hist( imdb$imdb_rating, breaks = 15, main = "Distribution of IMDb Ratings", xlab = "IMDb Rating", ylab = "Number of Movies", xlim = c(0, 10) )
hist( imdb$imdb_rating, breaks = 8, main = "Distribution of IMDb Movie Ratings", xlab = "IMDb Rating", ylab = "Number of Movies")
hist(imdb ratings)
hist(imdb$imdb_rating, breaks = 10, main = 'Movie Ratings', xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white")
hist(imdb$imdb_rating, breaks = 10, main = "Distribution of IMDb ratings (Source: IMDb)", xlab = "IMDb rating (points)", ylab = "Number of films")
hist(imdb$imdb_rating, breaks = 100)
hist(imdb$imdb_rating, breaks = 50, main = "Distribution of IMDb ratings for movies in the dataset", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white") mtext("Source: IMDb dataset used in class", side = 1, line = 3, cex = 0.8)
hist(imdb$imdb_rating, breaks = seq(0, 10, by = .1), main = "Distribution of IMDb Ratings", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies")
QUESTION 6 · Other responses · 5/8
Student responses
hist(imdb$imdb_rating, breaks = seq(0, 10, by = 0.5), main = "Distribution of IMDb Ratings for Movies in the Dataset", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white") mtext("Source: IMDb movie dataset used in class", side = 1, line = 3, cex = 0.8)
hist(imdb$imdb_rating, breaks = seq(0, 10, by = 0.5), main = "Distribution of IMDb ratings for movies", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white") mtext("Source: IMDb movie dataset used in class", side = 1, line = 3, cex = 0.8)
hist(imdb$imdb_rating, breaks = seq(0, 10, by = 0.5), main = "Distribution of IMDb ratings for movies", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white") mtext("Source: IMDb movie dataset used in class", side = 1, line = 3, cex = 0.8)
hist(imdb$imdb_rating, main = 'IMDB Ratings by Frequency', xlab = 'IMDB Rating', bin = 50)
QUESTION 6 · Other responses · 6/8
Student responses
hist(imdb$imdb_rating, main = "Distribution of IMDb movie ratings", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", breaks = 150, col = "lightblue", border = "white")
hist(imdb$imdb_rating, main = "Distribution of IMDB Ratings", xlab = "IMDB rating (0 to 10)", ylab = "Number of movies", breaks = 20, col = "lightblue", border = "white")
hist(imdb$imdb_rating, main = "Distribution of IMDb ratings", xlab = "IMDb rating (0-10)", ylab = "Number of movies", breaks = 20, col = "lightblue", border = "white")
hist(imdb$imdb_rating, main = "Distribution of IMDB Ratings", xlab = "IMDB rating", ylab = "Frequency", breaks = 20)
hist(imdb$imdb_rating, main = "Distribution of IMDb Ratings", xlab = "IMDb rating", ylab = "Number of movies", col = "skyblue", border = "white", breaks = 10)
hist(imdb$imdb_rating, main = "Distribution of IMDb Ratings", xlab = "IMDb rating", ylab = "Number of movies")
hist(imdb$imdb_rating, main = "Histogram of IMDB Ratings, From IMDB Database", xlab = "IMDB Rating", ylab = "Frequency", col = "green") I added labels
QUESTION 6 · Other responses · 7/8
Student responses
hist(imdb$imdb_rating, main = "Histogram of IMDb ratings", xlab = "IMDb rating", ylab = "Number of movies", col = "skyblue", border = "white")
hist(imdb$imdb_rating, main = "Imdb Rating distribution")
hist(imdb$imdb_rating,main = "Distribution of IMDb ratings", xlab = "Avg Rating", ylab = "Number of Ratings", breaks = 10)
hist(imdb$imdb_rating)
hist(imdb$imdb_rating) main = "Histogram of Total IMDB Ratings" xlab = "IMBD Rating (stars)" ylab = "Frequency (ratings)"
i add axis and labels
I add Descriptive title , Labeled axes + units , Appropriate bin width
I added x and y axis labels a title changed color of the plot
I changed nothign!
QUESTION 6 · Other responses · 8/8
Student responses
I changed the axes.
I changed the color, and the title and the axes names
I think this could be improved with a source attribution
library(ggplot2) ggplot(imdb, aes(x = imdb_rating)) + geom_histogram(binwidth = 0.5, fill = "steelblue", color = "white") + labs( title = "Distribution of IMDb Ratings", x = "IMDb rating (0 to 10)", y = "Number of films", caption = "Source: imdb dataset" )
sorry man
still working on it
title = total ratings distribution, x lab = rating from 0 to 10
Title has been added and x-axis expanded
x <- imdb$imdb_rating hist(x, breaks = seq(1, 10, by = 0.5), main = "Distribution of IMDb ratings", xlab = "IMDb rating (0 to 10)", ylab = "Number of movies", col = "lightblue", border = "white")
CLASS RECORD · QUESTION 7
Improve this bar chart with better labels, titles, sourcing, etc. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
67 anonymous responses
Other responses67
QUESTION 7 · Other responses · 1/8
Student responses
QUESTION 7 · Other responses · 2/8
Student responses
QUESTION 7 · Other responses · 3/8
Student responses
Add a title
add lablin and making each popt clearer
QUESTION 7 · Other responses · 4/8
Student responses
Add title and labels
added all labels
added title, and axis labels
all the labels are there, but maybe more bars
barplot( decade_counts$n, names.arg = decade_counts$decade, col = "steelblue", border = "white", main = "Number of Films by Decade", xlab = "Decade", ylab = "Number of films" ) sharp
barplot( decade_counts$n, names.arg = decade_counts$decade, col = "steelblue", border = "white", main = "Number of Films by Decade", xlab = "Decade", ylab = "Number of films", las = 2 ) If you want, you can also add a source note with mtext(): mtext("Source: film dataset", side = 1, line = 4, cex = 0.8) las = 2 rotates the decade labels so they are easier to read.
barplot( decade_counts$n, names.arg = decade_counts$decade, col = "steelblue", border = NA, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", las = 2 )
barplot( decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", col = "skyblue", border = "white", las = 2 )
QUESTION 7 · Other responses · 5/8
Student responses
barplot( decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", col = "steelblue" )
barplot( decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", col = "steelblue" )
barplot( decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", col = "steelblue", border = "white", las = 2 )
barplot( decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films", col = "yellow", border = "white" ) mtext("Source: film dataset used in class", side = 1, line = 3, cex = 0.8)
barplot(decade_counts$n, names.arg = decade_counts$decade, main = 'Number of Movies by Decade', xlab = 'Decade', ylab = 'Number of Movies')
barplot(decade_counts$n, names.arg = decade_counts$decade, main = "Films by decade", xlab = "Year", ylab = "Number of movies released")
QUESTION 7 · Other responses · 6/8
Student responses
barplot(decade_counts$n, names.arg = decade_counts$decade, main = "Number of films by decade", xlab = "Decade", ylab = "Number of films")
barplot(decade_counts$n, names.arg = decade_counts$decade, main = "Number of Movies Released per Decade, From IMDB Database", xlab = "Decade", ylab = "Number", col = "pink")
I added a title, axis labels for both x and y to make eveyrthing more clear
I changed the title and made the bins smaller.
I made this more understandable
I made x and y axis change names
i would add axes and title names main = "Number of Films by Decade", xlab = "Decade", ylab = "Number of films"
I would change decade title and number of films on y axis
imdb |> mutate(decade = floor(Year / 10) * 10) |> count(decade) -> decade_counts barplot( decade_counts$n, names.arg = paste0(decade_counts$decade, "s"), main = "Number of Movies Released by Decade", xlab = "Release Decade", ylab = "Number of Movies", las = 2 ) mtext( "Source: IMDb dataset", side = 1, line = 5, adj = 1, cex = 0.8 )
QUESTION 7 · Other responses · 8/8
Student responses
include axes titles
label all horizontal bars
par(mar = c(7, 4, 4, 2) + 0.1) barplot( decade_counts$n, names.arg = decade_counts$decade, las = 2, col = "steelblue", border = "white", main = "Number of films by decade", xlab = "Decade", ylab = "Number of films" )
The title should be "Distribution of Films throughout Time". The x-axis should be labeled as "Decade". The y-axis should be labeled as "Frequency". Sourcing should be attributed to IMDb.
This plot needs a titleggplot(films, aes(x = decade)) + geom_bar(fill = "steelblue") + labs( title = "Number of Films Released by Decade", x = "Decade", y = "Number of Films", caption = "Source: films dataset" ) + theme_minimal()
To improve this plot we could add labels as to what the axes actually are
use ggplot
You need to add axis labels, a better tick system for the x axis, a title, source of data, make it a histogram might be better too, rather than a bar chart?
CLASS RECORD · QUESTION 8 · 1/2
Explain why this won't work. How do we need to transform our data to compute the mean rating correctly?
82 anonymous responses
Data in wide format needs reshaping38Students note the dataset has one row per movie with multiple rating columns and must be converted to a long/tidy format (gather/pivot_longer) so all ratings are in a single column before averaging.
Multiple rating columns present15Students point out there are two separate rating measures/columns that must be handled before computing a mean.
Titles already aggregated/grouped8Student notes that titles are already grouped, suggesting aggregation may be preventing correct mean calculation.
Invalid or mismatched variable name7Students indicate the current variable name used for rating is incorrect or not found, implying a naming mismatch must be fixed.
CLASS RECORD · QUESTION 8 · 2/2
Response themes for question 8
Other responses5Responses the model could not place reliably.
Missing or incomplete ratings across rows4Students observe that not all ratings are present for every item and that all individual ratings are needed to calculate the correct mean.
Need to create a column for mean3Students suggest computing a new column (e.g., via mutate) that contains the mean rating after transforming the data appropriately.
Other responses2
QUESTION 8 · Data in wide format needs reshaping · 1/5
Student responses
All of the data is in wide form and needs to be translated to long form.
Because the dataset is now wide form. need to reshape the data from wide form to long form.
Because we are not claer about Title. We need to transform the data to numbers
current data has multiple rating columns
Data is already in a "wide" format, with one row per title. We want multiple rows per title, one row for each numerical rating.
Data needs reshaping
Each movie only has 1 row. it's in wide format and needs to be turned to long.
It won’t work because each Title can appear many times, and the Rating values are often stored as text ranges or separate pieces rather than one clean numeric value per movie. Taking mean(Rating) directly would either fail or give the wrong result.
mutate a new column
QUESTION 8 · Data in wide format needs reshaping · 2/5
Student responses
Need to transform the data from long form
no, currently the ratomg is shwon as number of votes but we need it as a proportion or weighted average to correctly calculate mean rating
Put all the ratings into one column
Since the one movie contains one row of imdb_rating only, so the mean function makes no sense here.
The data has one row per movie, with vote counts in separate columns for each star rating, rather than individual votes in a Rating column.
The data is in the wide format meaning a column exists for each rating category so mean rating can't be computed
The data is not in the correct form, the data needs to be pivoted longer
the data is not in the right form. need to make the data long
The data isn't in the right form because we are calculating the mean frequency for each rating instead of the actual mean of the stars being rated.
QUESTION 8 · Data in wide format needs reshaping · 3/5
Student responses
the ratings are in wide form so they are in 10 different columns and not under the name Rating. I think if we transform it to long in 1 column called rating, then we could do something like this
There is no column called rating. Our data is wide, meaning the ratings are split up between columns. We need our data to be long to summarize it like this.
This assumes that we have long data (a row for each movie + rating combo) but we have wide data, a column for each rating value
This code won’t work because each movie has one row with separate columns for each rating (1–10), rather than individual ratings. We need to reshape the data into long format and use the number of votes for each rating to calculate a weighted average.
This is not going to work because we do not have the data in tidy data. Instead, we need to make the data longer by making it so that values of our data are no longer column names
This will not work because "Rating" consists of different frequencies of 1, 2, 3, etc. It needs to be counted then averaged for each film.
QUESTION 8 · Data in wide format needs reshaping · 4/5
Student responses
This will not work because we do not have a column called rating, so we cannot take the mean of that, there are many rating columns present
This will not work, because we have the rows as each movie and this means we cannot group by title because title and ratings are both columns. We would basically need to invert the data, Have each row be a rating, and then group by title and average out the particular votes per rating
This won’t work because each movie is one row
This won't work because of the wide format of the data. It needs to be reshaped. The ratings need to be converted to long format
This won't work because Rating is the number of ratings of that movie not the actual rating. We need to get the mean rating by summing all of each rating and dividng by the total counts of rating.
This wont work because all rows are one film with each rating counted
We need the data to be in long format.
we need to calculate rating
We need to transform the data from ratings by their groups of stars using wide or long function.
QUESTION 8 · Data in wide format needs reshaping · 5/5
Student responses
We need to transform the data from wide to long
We need to transform the data to have a column for overall Rating, weighing the stars and making an overall total
We need to use pivot_long to get the each rating accounted for numerically, instead of categorically as a column by each title
You can't yet group by title as the data is in the wrong format for doing so.
Because Rating isn't a column name yet, meaning there is nothing for the code to find the mean of. We would need to get a Rating column.
For the mean rating to be computed correctly, we need to transform the data so that each row represents a movie
imdb is formatted so each row is a different review, not that each of the rows is the entirety of one variable.
its isn the wrong form as rating is rn serperate by 1s atr to start up to five
Rating is not a variable, there are a collection of rating coumns (1 ratings, 2 ratings, etc.) that need to be accounted for before we compute mean from all those individual ratings
Rating is not stored in the correct way for this to work, you have to manually create a function to compute the rating to do it like this
The data is currently long, both title and ratings are column names. We need to rearrange the dataframe
The ratings are currently stored int the same data, we what to store them in different period
there are two rating measures. Transform by either using mean between the two or picking one
There is no Rating column that has the a persons exact rating. You can't take the mean of this ratings column.
This won't work because the rating column is split into 5 different categories and the code doesn't know that could we create a mean rating using all 5 columns?
we currently have the number of ratings on each of the 1-5 starts so we don't have one whole ratings column where we can just find the mean
we need to transform the data. It is in long form right now, so each individual rating is its own column, so you can't just mean out the ratings. you need to use pivot_wide
Grouping by title averages each movie's own rating column with itself. We would need to sumarrize(mean_rating = mean(rating)) on the whoel datatset
I think we need to join the data somehow and then categorize it.
Multiple instances of a title?
The data has multiple rows per title for reasons other than separate ratings, so taking the function after grouping by Title can give a misleading result or just repeat the same rating information across duplicated rows.
The data isnt in the right form and we will need to ransfer the data so that is grouped correctly and we have to use pivot
the titles are already grouped, the rating # is how many raters not the score. we would need to use the rating # as weight for each score
title can appear multiple times with multiple ratings causing dupliting ratings skewing the mean
titles are not unique
QUESTION 8 · Invalid or mismatched variable name · 1/1
Student responses
Maybe because there isn't a category called "Rating" in the initial imdb data sheet? It needs to be transformed first
Rating is not one of our variables, and it should be weighted
rating isn't a column option, we need to use total rating, data is wide format and needs reshaping
Rating isn't a valid name here. Each row is a bijective with the title, so we need to convert each column (1 ratings, 2 ratings, etc) and mean over those to get the mean rating.
the data is not in the right format right now, there is no Rating column as of now
There is no rating column,
there is no variable named "Rating" yet
QUESTION 8 · Other responses · 1/1
Student responses
have to shift enter and do it one by one also check the spell
The data needs to be transformed so that we use the right mean and the table shows exactly what we need
The part with gettting the mean is wrong, you need to calculate it a different way, need to filter
There are many different movies for the same rating so taking the mean rating will give us a lot of duplicating values
Use the wieghts
QUESTION 8 · Missing or incomplete ratings across rows · 1/1
Student responses
because the data is stored right now as the number of 1 ratings, 2 ratings, etc so this will not work
Each Title is different, so summarize actually wont do any thing.
There would be missing or incomplete values, the data is also not in the correct shape
We need to get the raw votes to use this method.
QUESTION 8 · Need to create a column for mean · 1/1
Student responses
This will compute one mean for all movies.
You need to use mutate in order to make a new column for the mean rating
You need to use the mutate command first
CLASS RECORD · QUESTION 9
Describe in words how we can make the `imdb` table look like this -- what is the name of the operation we should perform? If there are 7,072 movies and ten rating levels, how many rows should the new table have?
0 anonymous responses
No responses were submitted.
CLASS RECORD · QUESTION 10 · 1/2
What went wrong? Why does `mean(rating)` return `NA` instead of an average?
81 anonymous responses
Missing values present (NAs)31Responses identifying that NA/missing values in the data cause the mean to return NA.
Ratings stored as strings, not numeric15Responses pointing out that rating values are text (e.g., '1 rating') or contain titles, so they cannot be averaged.
Wrong column name or variable used13Responses saying the code is referencing the incorrect column or object (wrong name like rating vs ratings or imdb_rating) or the rating variable wasn't created.
Need to group before aggregating9Responses saying aggregation should be done within groups (by movie title) rather than overall.
CLASS RECORD · QUESTION 10 · 2/2
Response themes for question 10
Mention of is.na misuse or not using is.na5Responses noting that the is.na function should be used (or warning against not using it) to handle missing values.
Code worked for that student3Responses stating the code ran successfully for the responder (no issue encountered).
Other: weighting or not weighted3Responses mentioning weighting or that the mean didn't weight counts (distinct viewpoint about aggregation/weighting).
Other responses2
QUESTION 10 · Missing values present (NAs) · 1/4
Student responses
Because we haven't actually weighted the ratings yet we just have the number of the different ratings that were given
For some reason i dont get the error that everyone else is getting but I assume the reason for the error is that there are some ratings where people dont rate?
if there is even one na within the data or if there is any non numeric values, the mean cannot be computed and it prints out na
It doesn't drop missing numbers, so NA becomes the average
It returns NA instead of the average because each column has different number of ratings
maybe some movies don't have every rating, so they have NA in that column, and so it returns NA
mean(rating) returns NA because if there is any missing value, the mean will be calculated as NA
mean(rating)returns NA because there exists an entry NA
missing data
QUESTION 10 · Missing values present (NAs) · 2/4
Student responses
one of the values is missing
some of the ratings are na
The data type isn't numeric
The mean_rating turns out to be NA because we failed to filter out NA values in rating before.
The NAs were not removed.
The rating columns contains atleast one N/A value and by default mean adds this NA to the whole result rather than ignoring it
The rating is text, not numbers, so it cannot be used with mean().
There are missing values, leading to the value of NA.
there are na in the data
QUESTION 10 · Missing values present (NAs) · 3/4
Student responses
There are NA ratings still in the data set. 1 + NA / 4 = NA
There are some missing values, so the mean returns NA
There is a NA value where a movie is not rated
There is an issue with NAs somewhere in the column
there may be some missing data
There might be an NA value in 'rating'
There must have been a missing value for one of the data points, which does not let us calculate the mean, the ratings are in text form and need to be converted to numbers so that they can be added and divided
There was possibly one missing NA so that causes the entire thing to be NA
There's missing data and we can't add missing values to the total to average out
QUESTION 10 · Missing values present (NAs) · 4/4
Student responses
theres some NA values
they use Total Ratings, not ratings
This did not work because it is dealing with NA values and cannot pass these through arithmatic functions so the entire thing will evaluate to NA. To fix this, we can have it ignore NA values
We have NA's somewhere in these columns, or that these original data are strings and not doubles.
QUESTION 10 · Ratings stored as strings, not numeric · 1/2
Student responses
Can't mean rating because they're not a numeric value. They're categories for the ratings not an actual numerical value that can be summed.
It is currently a string, 1 rating 2 rating no the no . of starts ur giving it ratings_long |> mutate(rating = readr::parse_number(rating)) |> summarize(mean_rating = mean(rating, na.rm = TRUE))
It went because they aren’t numeric values they’re continuous
mean(rating) returns NA because rating contains text such as "1 ratings" rather than numbers. mean() cannot average text. Extract the numeric values first:
might be stored in a different format like text or missing altogether, meaning mean can't compute the average since it only works on numerics and logicals
rating column doesn't have any values in it need to use n column
rating column is text and not numbers, mean only works on numbers so it returns NA
rating is not a number. It is a string
ratings are now "1 rating", "2 ratings", etc, they are strings, which couldn't be averaged
QUESTION 10 · Ratings stored as strings, not numeric · 2/2
Student responses
the current rating column is an a string from 1 rating to 10 rating, not a numerical value. As a result, ratings_long prints out a NA vallue.
The rating column contains text (like "1 ratings") instead of numbers. Since mean() only works with numeric values, we need to convert the ratings into numbers before calculating the average.
The rating column contains the string name of the rating type, rather than the numerical value.
The rating column contains the titles of the former rating columns, not the vote counts themselves.
The warning means rating is not stored as a numeric variable. It is probably character or factor text, so mean() cannot average it and returns NA. Common causes: - values like "4 stars" instead of 4 - factor labels - mixed text and numbers - missing values written as text Check it with: class(rating) str(rating)
They are not numbers they are categories.
QUESTION 10 · Wrong column name or variable used · 1/2
Student responses
Because it should be ratings, not rating, without an s it can be very different
Because rating isn't the correct name of the column, "ratings" is. And it probably needs to be in quotations.
Because the mean should be calculating "ratings" instead of "rating"
incorrect data type
It is NA because here "rating" is the count of the each starts while in this function we want to actually find the average of star values not how many ratings there are
It returns an NA instead of an average because the values aren't numbers.
It says that the argument is not numeric or logicial. it doesn't know what "rating" is
the rating object wasn't created with proper values
they didn't use the right name
QUESTION 10 · Wrong column name or variable used · 2/2
Student responses
we called it ratings not rating, so when I fixed it I got 14422.
We changed rating to star, so it cant find rating anymore?
We probably averaging a column that is not the actual star rating. A result like 14422 suggests rating contains something else, such as counts, IDs, or badly parsed text turned into numbers.
We used the wrong variable for ratings
QUESTION 10 · Need to group before aggregating · 1/1
Student responses
First the data is grouped by title so it is trying to give the mean rating for all movies and so it is possible that movie doesn't have data at a certain value causing it to be NA
It didn't take into account the value of the ratings ie 1 star, 2 star, etc. Because of this, it returned NA instead of the proper average
not grouped or calculated right
since there is no group?
The R didn't find the pip of rating inside it, which make it has a R Error
the ratings are now in each column and not a single one, you can't mean a string
The ratings aren't grouped by movie yet, so the average for a given movie can't be calculated, as they are also in text format
This went wrong because it was not weighting the scores correctly and then dividing by the total number of votes. It also needs to group by movie, so that it preserves ratings for each movie
We need to group by movie title, also the movies are text so we cannot calculate the mean
QUESTION 10 · Mention of is.na misuse or not using is.na · 1/1
Student responses
do not use is na
I think rating is stored as factor instead of numeric variable, or mabe do na.rm = true
Maybe there was a 0 in the data somewhere? I'm not getting the same NA that is supposed to be happening so I'm not sure.
The rating columns are getting grouped together?
there are too many different rating columns it doesn't know which one we mean to group by
QUESTION 10 · Code worked for that student · 1/1
Student responses
i didnt get an error
it worked for me
The code actually works for me and I am given the value of 14422.
QUESTION 10 · Other: weighting or not weighted · 1/1
Student responses
answer is text not #
Because we need to weight the number of counts for each rating for each movie before finding a true mean.
this is because we do not have the variable name of rating, and we should use weighted average
CLASS RECORD · QUESTION 11 · 1/2
What would `small_votes |> summarize(mean(rating))` produce? What is the actual average across the four people? Explain why the answers differ.
84 anonymous responses
Gives numeric difference and result 419Student states '4' and mentions a difference of 1.5, implying an attempted calculation or comparison but unclear reasoning.
Unsure or no answer given19Student indicates they do not know or cannot determine the result.
Explains 6 vs 4 due to weighting17Student states the summarize result is 6 but that the true average across four people is 4, and explains the discrepancy by noting the mean calculation ignored frequencies or weights.
Says it prints 6 (no explanation)7Student asserts the output is 6 without additional reasoning or mention of the actual average.
CLASS RECORD · QUESTION 11 · 2/2
Response themes for question 11
Says summarize returns 67Student asserts the summarize call yields 6, implying they computed an unweighted mean or sum rather than the per-person average.
Restates the code without answer6Student simply repeats the code snippet and does not provide a numerical result or explanation.
Explicit weighted-average calculation noted5Student explicitly shows how to compute the true average using weights (sum of rating×votes divided by total votes) and identifies the code's error of averaging distinct rating labels instead of accounting for vote counts.
Gives a numeric average (4)4Student reports the average as 4 (interpreting result as four stars) without explanation of discrepancy.
QUESTION 11 · Gives numeric difference and result 4 · 1/3
Student responses
`mean(rating)` <dbl> 1 6, but actual is 4. The mean didn't take votes into account
1.5, 5.5. the actual mean is 4
4, it is was 1.5 less
6 and 4, 6 because there is more equal weight, 4 because the weightings are different
6, averages 2 numbers in rating column, ignoring votes column. differs bc mean
6,4
6; 4; unweighted vs weighted average
average two rows
It prints out 6, while it should have printed 4.
QUESTION 11 · Gives numeric difference and result 4 · 2/3
Student responses
It produced the average of the numbers "2" and "10" instead of the average including the counts for each rating
It would give a mean of the ratings. The actual average is 3, and they differ because of a bug in the code.
it would give the mean of 2 and 10 which is 6, but the actual mean is 4. These differ because it is not taking into account how many time each rating is made
Mean(rating) only takes the mean of the values in the rating column. instead, we want to weight 1, 2, ... 10 by the actual number of people who gave that rating of 1, 2, ..., 10
returns 6, actual 4, it is a weighted mean
small_votes |> summarize(mean(rating)) would take the mean of the ratings in the table, not weighted by how many people gave each rating. So if the table has one row for 2 stars and one row for 10 stars, it would give (2 + 10) / 2 = 6. The actual average across the four people is: (2 + 2 + 2 + 10) / 4 = 16 / 4 = 4.
summarize(mean(rating)) would give 6, as the rating col adds to 12, which divided by 2 is 6. The actual avg is 8.
QUESTION 11 · Gives numeric difference and result 4 · 3/3
Student responses
This would produce a mean rating of 6, as it only accounts for two numbers. The correct number should be 4.44, it's not weighted.
Weighted average
you would get 6, but the answer we are looking for is 2, because we are averaging the rating values not the most common rating
QUESTION 11 · Unsure or no answer given · 1/3
Student responses
6
gives you the mean between all 4 ratings, averages ratings equally no weighting
idk
It returns 6, THe actual should be 6 +10/2 which is 8. So for some reason it downgrades it but I think it takes straight average of 2 + 10 and doesnt consider the votes
It would give 6
It would just average all the numbers, add them up and divide, not give what
It would produce 6. However, the actual mean rating is 4. Simply using small_votes |> summarize(mean(rating)) does not take the weight of frequency into account.
It would produce a mean of 4, whereas the actual average should be much closer to 2 because of the higher quantity of votes.
It would produce the mean of literally the set {2, 10}. The actual average would require finding the weighted average
QUESTION 11 · Unsure or no answer given · 2/3
Student responses
it would provide the mean per person rather than the mean overall
it would summarize the mean of ratings
Mean rating would give 6. The actual average is 4. They differ because mean(rating) just averages the rating categories that were given, while the actual average has to take into account the number of ratings in each category
not sure
summarize would return 6. the actual average is 4. they would differ because of weighting.
That code results in the number 6, while the actual average is 4. This is because you are only taking the mean of the ratings column, without taking into account how many people submitted that rating.
The average would be a 4/10?
the code produces a mean rating of 6, which is different from the actual average of 4. These differ because the code is doing (2+10)/2 instead of (2+2+2+10)/4
The rating mean should be 8
QUESTION 11 · Unsure or no answer given · 3/3
Student responses
You would get 6, not the actual average rating. You need to multiply each rating by n number of ratings before you take the average.
QUESTION 11 · Explains 6 vs 4 due to weighting · 1/3
Student responses
acutal average is 4, sumamrise onlycalcualtes means of rating but no of votes it got
average/mean is 4 but it would give 6. Code is adding up ratings then dividing. It is not calculation correctly
it doesn't take into account how Many people voted
it would give 6 as it doesnt take into consideration that 3 people voted 2, making the real mean 4
It would give 6 as the actual value instead of the correct value of 4 since it does not account for the frequency of the votes
It would give 6. The actual mean should be 4, however we don't get that because the mean function only finds the mean between the two values given, it doesn't factor in the frequency of those values.
It would give an average of 6 because 10+2 / 2 = 6. The actual average rating is 4, because the value 2 got 3x the number of votes as the value 10
it would produce 6 because it takes the average of the rating labels, as if there were only 1 person who voted for each. The real answer is 4
It would produce 6 because the average of 10 and 2 is 6. The actual average is 4
QUESTION 11 · Explains 6 vs 4 due to weighting · 2/3
Student responses
it would produce 6, the average of 2 + 10 / 2, but the actual answer is 4. The answers differ because the code does not take into account the number of times each rating was given.
It would take the mean rating of the four people, and it differs from the actual mean because of its calculation methods.
It wouln't count all the 2s it would just guve 6. instead of 4.
mean rating would give you a 6, but you have to take a weighted average, meaning for each row, rating * votes summed up divided by sum(votes) to get the actual average across the four people
The code would give us 6 because it is the average of 2 and 10 because it is not factoring in the number of votes. the actual mean should be 4.
The code would produce an average of 6, but the actual average across all four people is 4. This is because mean() treats both ratings equally instead of accounting for how many people gave each rating.
The command produces 6, but the actual average is 4. The difference is sourced from failure to take number of votes into consideration.
QUESTION 11 · Explains 6 vs 4 due to weighting · 3/3
Student responses
You would get 6. The mean(rating) just finds the mean of the numerical labels "2" and "10" without looking at the actual number of votes.
QUESTION 11 · Says it prints 6 (no explanation) · 1/1
Student responses
6, but the actual should be 4
6, the different sample gives different answer
it prints 6
it would produce 6
it would produce 6 because it is asking the mean of 10 and 2
it would produce 6. actual average would 6. it differs as the previous one did not count the numeric values
The code gives 6 as the average rating but the real average rating is 4
QUESTION 11 · Says summarize returns 6 · 1/1
Student responses
1
I got 6, but it should be 4.
It would give 6 but it would need to give 4
It would yield 6. It doesn't take the average weighted by the number of votes.
mean(rating) gives 6, but the average is actually 4. They are different because mean(rating) treats each rating level equally and does not account for the number of votes.
they differ because way r averages out eacn one
we would need to do a weight average since not all points count the smae
QUESTION 11 · Restates the code without answer · 1/1
Student responses
Actual avg is 4, but this will give 6 bc its taking each value as its own rating even the number of votes.
If you did summarize(mean(rating)), it would calculate 6 as the average. If you did votes instead, it would calculate 2 as the mean.
It would give 6 because it just averages 2 and 10, but the real answer would be (2*3 + 10*1) / (3 + 1) which would be 4. It needs to be weighted.
It would give us the mean between 2 and 10 ratings which would be weighted and give 4
It is missing out on what the total actually is for the number of votes casts. It is missing out on having this figure change to reflect votes for only that specific movie.
It would produce 6 but we would expect 4 and this happens because it does 2 times 3 but we want 4. The votes have different weights
ratings of either 2 or 10, with 3 or 1 vote
The code would just give the mean between 2 and 10 which is 6. But the actual mean should be 2 + 2 + 2 + 10 / 4, because we need to take in consideration of the number of peple who voted each rating.
QUESTION 11 · Gives a numeric average (4) · 1/1
Student responses
It would return 16/4 so an average of 4
mean rating be 4
small votes would probably say the mean is 6. the actual value should be 4
The actual average would be 4 stars but the small votes would produce
CLASS RECORD · QUESTION 12
Improve this scatterplot: add a descriptive title, labeled axes, and a source. Make overlapping points easier to see. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
72 anonymous responses
Other responses72
QUESTION 12 · Other responses · 1/10
Student responses
QUESTION 12 · Other responses · 2/10
Student responses
QUESTION 12 · Other responses · 3/10
Student responses
QUESTION 12 · Other responses · 4/10
Student responses
add color
added axis labels
QUESTION 12 · Other responses · 5/10
Student responses
added title, axis labels
Added titles to it and tried to make it easier to see overlapping
Added titles, grid layout, better domain and range spacing intervals
Added tittle
change the lable
Change the title to Movie Rating vs. Imdb rating, and the axis' titles to match that.
Change the title, etc.
change x axis to mean rating, y axis to imdb rating
Example in ggplot2: ggplot(movies, aes(x = raw_avg_vote, y = imdb_score)) + geom_point(alpha = 0.5, color = "steelblue", size = 2) + labs( title = "Raw average votes and IMDb scores for movies", subtitle = "Each point represents one movie", x = "Raw average vote", y = "IMDb score", caption = "Source: movie ratings dataset used in class" ) + theme_minimal()
QUESTION 12 · Other responses · 6/10
Student responses
ggplot(movies, aes(x = raw_avg, y = imdb_score)) + geom_point(color = "tomato", size = 3, alpha = 0.6) + labs( title = "Raw average vs IMDb score", x = "Raw average score", y = "IMDb score", caption = "Source: movies dataset" )
Here is the updated plot.
i added the labels but had a hard time reducing the clutter and noise towards the upper right hand corner
I changed the title and named the axes
I have added axis and make it clearer
labels for all axis and title )messed up code)
library(ggplot2) ggplot(movies, aes(x = audience_score, y = imdb_rating)) + geom_point(alpha = 0.5, color = "steelblue") + labs( title = "Audience score vs IMDb rating for movies", x = "Audience score", y = "IMDb rating", caption = "Source: movie ratings dataset" ) + theme_minimal()
movie_means |> ggplot(aes(x = mean_rating, y = imdb_rating)) + geom_abline(slope = 1, intercept = 0, color = "gray60", linewidth = 0.8) + geom_point(alpha = 0.15, size = 1.5, color = "steelblue") + labs( x = "Raw average rating (1–10)", y = "IMDb rating (1–10)", title = "Raw average rating vs IMDb rating" ) + theme_minimal()
QUESTION 12 · Other responses · 7/10
Student responses
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Average movie rating vs IMDb rating", xlab = "Mean raw audience rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0.4, 0.8, 0.5) ) abline( lm(imdb_rating ~ mean_rating, data = movie_means), col = "red", lwd = 2 )
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Average movie rating vs IMDb rating", xlab = "Raw average rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0, 1, 0.4) ) abline(lm(imdb_rating ~ mean_rating, data = movie_means), col = "red", lwd = 2) mtext("Source: movie_means data", side = 1, line = 4, cex = 0.8)
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Calculated Mean Rating vs IMDb Rating", xlab = "Calculated Mean Rating", ylab = "IMDb Rating", pch = 16, cex = 0.6, col = rgb(0, 0, 0, 0.25) ) mtext("Source: IMDb dataset", side = 1, line = 4, adj = 1, cex = 0.8)
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Computed Mean Rating vs. IMDb Rating", xlab = "Computed Mean Rating", ylab = "IMDb Rating" )
QUESTION 12 · Other responses · 8/10
Student responses
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Raw average rating vs IMDb rating for movies", xlab = "Raw average rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0, 1, 0.4) )
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Raw average rating vs IMDb rating for movies", xlab = "Raw average rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0, 1, 0.4) ) mtext("Source: movie_means data", side = 1, line = 3, cex = 0.8)
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Raw average rating vs IMDb rating", xlab = "Raw average rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0, 1, 0.4) ) mtext("Source: movie_means data", side = 1, line = 4, cex = 0.
plot( movie_means$mean_rating, movie_means$imdb_rating, main = "Raw average vs IMDb score for movies", xlab = "Raw average rating", ylab = "IMDb rating", pch = 16, col = rgb(0, 0, 1, 0.4) )
plot(movie_means$mean_rating, movie_means$imdb_rating, main = 'IMDB Rating vs Average Score', xlab = 'Average Score', ylab = 'IMDB Rating', col = 'forestgreen')
QUESTION 12 · Other responses · 9/10
Student responses
plot(movie_means$mean_rating, movie_means$imdb_rating, main = "Mean Movie Ratings on IMDB", xlab = "raw avg rating", ylab = "IBDB Rating")
plot(movie_means$mean_rating, movie_means$imdb_rating, main = "Mean Rating vs IMDB Rating, from the IMDB Database", xlab = "Mean Rating", ylab = "IMDB Rating", col = "blue")
plot(movie_means$mean_rating, movie_means$imdb_rating, main="Imdb rating vs Mean rating", xlab="mean rating", ylab='imdb rating')
plot(movie_means$mean_rating, movie_means$imdb_rating, xlab = "Mean rating", ylab = "IMDb rating", main = "Mean Rating vs IMDb Rating")
plot(movie_means$mean_rating, movie_means$imdb_rating, xlab = "Raw average rating", ylab = "IMDb rating", main = "Raw average vs IMDb rating")
QUESTION 12 · Other responses · 10/10
Student responses
SLIDE 29 Ask about this slide Close Your question Ask for an explanation, R code, or help with this slide. Ask Your questions Slide 29 improveplot(movie_means$mean_rating, movie_means$imdb_rating) Try adding labels, a title, a source note, and transparency so overlapping points are easier to see. improveplot(movie_means$mean_rating, movie_means$imdb_rating) + labs( title = "Raw average rating vs IMDb rating for movies", x = "Raw average rating", y = "IMDb rating", caption = "
Spacing
Still needs a title
This graph could be improved with a title
CLASS RECORD · QUESTION 13
What does a point above or below the 45-degree line tell us about its two scores? Why might such discrepancies occur?
0 anonymous responses
No responses were submitted.
CLASS RECORD · QUESTION 14
- Start with all movies in `movie_means` and calculate `gap` as `mean_rating` minus `imdb_rating`. - Order movies by the absolute value of `gap`, largest first. - Keep the movie with the largest absolute gap. - Show its title, release year, computed mean rating, IMDb rating, and `gap`.
- Group the movies by `decade`. - Summarize into one row per decade, including the number of movies as `n_movies`. - Calculate `avg_rating` as the mean of `imdb_rating` within each decade, giving every movie equal weight.
imdb_decade |> head()movies %>%
group_by(decade) %>%
summarise(
n_movies = n(),
avg_rating = mean(imdb_rating, na.rm = TRUE)
)
This groups by decade, counts movies in each decade, and computes the average IMDb rating with each movie weighted equally.
If you want to check the result in a nice order, you could add:
movies %>%
group_by(decade) %>%
summarise(
n_movies = n(),
avg_rating = mean(imdb_rating, na.rm = TRUE)
) %>%
arrange(decade)
Improve this boxplot: add a descriptive title, labeled axes, readable decade labels, and a source. Keep the decades in chronological order. You can use the ? button to ask AI for help. Run your code, then submit your plot so we can compare designs.
67 anonymous responses
Other responses67
QUESTION 16 · Other responses · 1/10
Student responses
QUESTION 16 · Other responses · 2/10
Student responses
QUESTION 16 · Other responses · 3/10
Student responses
QUESTION 16 · Other responses · 4/10
Student responses
QUESTION 16 · Other responses · 5/10
Student responses
add better titles and labeles axes
add labnels rotatet it
Added a title and more details
added title
Added title
Added titles and axes titles
boxplot( imdb_rating ~ decade, data = imdb_decade, main = "IMDb Ratings by Release Decade", xlab = "Release Decade", ylab = "IMDb Rating", las = 2 )
boxplot( The imdb rating ~ The decade, data = imdb_decade). Color code the boxes too
boxplot(imdb_rating ~ decade, data = imdb_decade, col = 'orange')
QUESTION 16 · Other responses · 6/10
Student responses
boxplot(imdb_rating ~ decade, data = imdb_decade, horizontal = TRUE, main = "IMDb ratings by decade", xlab = "IMDb rating", ylab = "Decade", las = 1)
boxplot(imdb_rating ~ decade, data = imdb_decade, main = 'Ratings by Decade', xlab = 'Decade', ylab = 'IMDB Ratings' )
boxplot(imdb_rating ~ decade, data = imdb_decade, main = "Boxplot of Rating by Decade", xlab = "Decade", ylab = "IMDb Rating")
boxplot(imdb_rating ~ decade, data = imdb_decade, main = "Distribution of IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2) mtext("Source: IMDb movie data", side = 1, line = 4, cex = 0.8) las = 2 makes the decade labels easier to read by rotating them.
boxplot(imdb_rating ~ decade, data = imdb_decade, main = "Distribution of IMDB Ratings for each decade, from the IMDB Database", xlab = "Decade", ylab = "IMDB Rating", col = "purple")
QUESTION 16 · Other responses · 7/10
Student responses
boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDb Ratings by Decade!!!", xlab = "Decade", ylab = "IMDb rating", las = 2, col = c("hotpink", "yellow", "cyan", "limegreen", "orange", "purple", "red", "blue"), border = "magenta") mtext("Source: IMDb data", side = 1, line = 4)
boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDB Ratings by Decade", xlab = "Decade", ylab = "IMDB Rating")
boxplot(imdb_rating ~ decade, data = imdb_decade, main="IMDB rating distribution over decades", ylab='imdb rating', col='green', border='yellow')
decade_levels <- sort(unique(imdb_decade$decade)) imdb_decade$decade <- factor(imdb_decade$decade, levels = decade_levels) boxplot( imdb_rating ~ decade, data = imdb_decade, main = "IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue", border = "gray40" )
QUESTION 16 · Other responses · 8/10
Student responses
ggplot(imdb_decade, aes(x = decade, y = imdb_rating)) + geom_boxplot(fill = "skyblue", color = "navy") + labs( title = "IMDb Ratings by Decade", x = "Decade", y = "IMDb rating", caption = "Source: IMDb" ) + theme_minimal() + theme( axis.text.x = element_text(angle = 45, hjust = 1) )
Here is my boxplot.
I added titles and axes names
i changed the color
I changed the title. It kicks me out every time so I'm leaving this at that
I made it blue.
imdb_decade$decade <- factor( imdb_decade$decade, levels = sort(unique(imdb_decade$decade)) ) boxplot( imdb_rating ~ decade, data = imdb_decade, main = "IMDb movie ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue" ) mtext("Source: IMDb data", side = 1, line = 4, cex = 0.8)
imdb_decade$decade <- factor(imdb_decade$decade, levels = sort(unique(imdb_decade$decade)) ) boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2 ) mtext("Source: IMDb", side = 1, line = 4, cex = 0.8)
QUESTION 16 · Other responses · 9/10
Student responses
imdb_decade$decade <- factor(imdb_decade$decade, levels = sort(unique(imdb_decade$decade)) ) boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue" )
imdb_decade$decade <- factor(imdb_decade$decade, levels = sort(unique(imdb_decade$decade))) boxplot(imdb_rating ~ decade, data = imdb_decade, main = "Distribution of IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue") mtext("Source: IMDb data", side = 1, line = 4, cex = 0.8)
imdb_decade$decade <- factor(imdb_decade$decade, levels = sort(unique(imdb_decade$decade))) boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue") mtext("Source: IMDb data", side = 1, line = 4, cex = 0.8)
QUESTION 16 · Other responses · 10/10
Student responses
par(mar = c(8, 4, 4, 2) + 0.1) boxplot(imdb_rating ~ decade, data = imdb_decade, main = "IMDb ratings by decade", xlab = "Decade", ylab = "IMDb rating", las = 2, col = "lightblue", cex.axis = 0.9) mtext("Source: IMDb dataset", side = 1, line = 6)
titles, Dif intervals
CLASS RECORD · QUESTION 17
- Group all movies in `imdb` by release `Year`. - Summarize into one row per year, with `avg_rating` equal to the mean of `imdb_rating`, giving each movie equal weight. - Include `n_movies`, the number of movies in each year. - Save the result as `yearly_ratings` and display the first few rows.
This file includes only movies with at least 25,000 votes. Which older movies are likely to reach that threshold today? Which might be missing? How does this selection process affect the trend in average ratings over time?
80 anonymous responses
Selection favors famous older films39Students note that older movies reaching the vote threshold are typically well-known, popular, or classics, so the dataset includes higher-profile older titles.
Availability and dataset coverage issues12Students mention practical availability (streaming, theater presence, sequels) and dataset coverage affecting which older films reach vote thresholds and thus bias results.
Selection makes apparent rating trend changes9Students link the vote threshold to apparent changes in average ratings over time, e.g., newer films lowering means or older films appearing overly positive due to selection bias or growing movie counts.
CLASS RECORD · QUESTION 18 · 2/3
Response themes for question 18
High-rated low-vote movies exist6A minority view noting some films may have very high (or low) average ratings despite not reaching the vote threshold, so notable titles could be excluded based on vote count alone.
Only good older films get watched5Students suggest viewers primarily watch older films that are high quality, implying poorer older films lack votes and are excluded.
Unclear or irrelevant response4Responses that are not informative or do not address the question meaningfully.
CLASS RECORD · QUESTION 18 · 3/3
Response themes for question 18
Older films lack early rating mechanisms3Some older movies may be missing simply because rating platforms or widespread rating behavior did not exist when they were released, so they never accumulated enough votes despite potential interest.
Other responses2
QUESTION 18 · Selection favors famous older films · 1/9
Student responses
A lot of older movies will not have at least 25000 votes because a lot less people watched movies back then. It is plausible that only the super good movies got a lot of votes
Better older movies are more likely to reach that threshold, and worse ones are less likely. This skews it such that the mean of older movies is higher than it actually is
classics, missing might be forgotten older movies that wasn't as popular back then
creates selection bias the older movies are dis
Essentially, only "classic" older movies will be the ones with at least 25,000 votes. Today, many movies that are widely not considered good will garner that many votes; however, people nowadays who watch an older movie will almost certainly do so because that movie is a "classic" and therefore such movies will have a higher imdb_rating than the average movie released today.
QUESTION 18 · Selection favors famous older films · 2/9
Student responses
For older movies, it is less likely for them to reach over 25,000 votes, and those that do are likely more watched because they are considered better. Thus, older worse movies may exist but not be counted because they aren't even popular enough to meet the threshold, whereas all modern movies are spread through social media and can more easily be heavily voted on.
I think the Godfather would meet that threshold today for sure, thsi slection porcess affects the trend in average ratings over time because more recent movies have higher amounts of data on them, instead of older movies
I think the older movies that are more likely to reach this threshold today would be movies that are considered "classics". Movies that people didn't enjoy or know about would be missing. This selection process affects the trend in average ratings over time because before the internet existed, people wouldn't have been able to easily input their ratings, leading to less values.
QUESTION 18 · Selection favors famous older films · 3/9
Student responses
More earlier movies not that popular nowadays could be ignored even though they are much better in quality of the movie. This selection process would affect the trend negatively in average ratings over time as the movies which dont reach this threshold is ignored
Most votes may come from the time of the movie's release when it is the most popular, older movies don't have that. very popular famous old movies have lots of votes
Movies that are considered a "classic" would be more visible on imdb, and then continue to get more ratings because of it. It is a bias that makes them more present.
Movies that are old and classical enough may be able to reach the threshold. Movies that are too old that few people watched today or that are too new that few have watched it may be missing.
Obsession is likely to reach that threshold, and the 25,000 vote selection process might skew rating higher toward better movies that have been watched more.
QUESTION 18 · Selection favors famous older films · 4/9
Student responses
Older movies have more time to reach 25,000 votes, while some newer movies may not have reached that threshhold yet, even if they're really good movies, which brings down the mean rating.
Older movies in this dataset may be selectively popular or well-known films because only movies with at least 25,000 votes are included.
Older movies like wizard of oz would likely make the cut, and other good movies. This would lower average
Older movies that are popular or considered classics are more likely to have at least 25,000 votes, while less popular older movies may be missing. This creates selection bias, making older movies appear to have higher average ratings than newer movies because only the more popular older films are included.
Older movies that are still popular or well-known are more likely to have 25,000 votes. Less popular older movies may be missing. This creates selection bias, so the average ratings for older movies may not represent all movies from that time.
QUESTION 18 · Selection favors famous older films · 5/9
Student responses
Older movies that are still popular today will hvae higher votes, which lead to biased result, considering they will get higher ratings.
Older movies that have that many ratings are much more accessible and likely are more highly regarded than less accessible and worse films. This would give them a higher average rating than newer films, which are highly accessible regardless of quality
Older movies that were popular and well regarded are more likely to reach that threshold today. The older bad movies are likely missing which could give a false downward trend.
Older movies with at least 25,000 votes are likely to be the more famous or popular ones, while many less-known older movies are missing. This creates selection bias and may make average ratings for older movies look artificially high compared with newer movies.
older popular movies are more likely to reach that threshold, because if they are not good, less people are inclined to watch those films. Bad movies that people did not like, will not show up here because people realized they were bad and stopped watching them
QUESTION 18 · Selection favors famous older films · 6/9
Student responses
Only older, really popular movies that are highly regarded would show up and bad movies might be missing whereas in modern times more movies are rated by 25,000 votes so that could explain the lower ratings trend as we move closer to modern times.
Only popular movies likely met the 25,000 vote threshold. This leaves less mainstream movies to be voted on. Since popular movies are the ones being voted on, those years likely have an inflated rating overall, compared to all m ovies from today
only very good old movies are likely to have this many votes, which could lead older data to be skewed towards higher ratings
only very popular movies from the 1900s are going to reach that many, so they are going to have higher reviews. There will be lots of missing data from movies with 24,000, etc. This will show averages going down as more and more people vote and there are more movies to be judgy about nowadays. All the data we collect from the past will probably be overly positive.
QUESTION 18 · Selection favors famous older films · 7/9
Student responses
Popular mvvoies wll more likely to pass this threshold since they will have more votes than the unpopular ones. Since popular movies are more likely to be a better movie and have better rating, it will overestimate the actual rating of the movies.
revenges
Some old well-known movies like Citizen Kane could not have received enough votes. This hurts our findings when looking over time
The 'classics' which tend to be critically acclaimed, thus bringing up their averages. Less-watched older films will be ignored.
The 25,00 vote cutoff only keeps old movies that are still famous today
The Godfather or any older popular classics, makes the trend more noticable for today's movies
the most popular movies are likely to reach that threshold today, especially ones people still rewatch today. The movies that were popular with the older generation but not anymore will be missing, and even though they were well liked, they won't be represented.
QUESTION 18 · Selection favors famous older films · 8/9
Student responses
The movies that are likely to reach the 25,000 votes that are older are likely to be movies that people consider classics or are on a movie list for being very well done. This is different because we do not actually see a random amount of people just rating movies from all time but people deliberately seeking out good ones
The older movies to hit that many votes are probalby the more highly rates ones, which skews the adta to say that the older movies are generally higher rated
The only older movies that are likely to reach 25k votes are those that are spread through word of mouth as being classics, which are probably going to be better than the median movie today. It's survivorship bias, only the best movies showing up in the data, making it look like recent movies just aren't as good.
The only older movies that are receiving lots of ratings today are probably one that were really popular and really good so the average ratings for those movies are skewed
QUESTION 18 · Selection favors famous older films · 9/9
Student responses
We are likely missing movies that may have been popular at their time of release, but are not as popular now. Older movies must have retained popularity for many years to be included.
QUESTION 18 · Availability and dataset coverage issues · 1/2
Student responses
As the years go on, the more movies are released so maybe people have more movies to compare others to. Older movies could be missing which would make the average rating higher
Movies in the middle of 1925 to 1950 are likely to reach the mean rating that we see now. There is a relationship between accuracy and the number of data points available
Movies that are not easily accessible online like via netflix
Movies that are popular, the ones that didnt make it to theaters or a large stremaign sevrice, it doesnt give accurate reuslts
Movies with higher ratings, lower rating movies and various reasons
New movie may not have enough votes since they are newer. This will reduce the voting number by the time.
newer movies might be missing because they haven't reached the threshold yet and older movies are more likely to make the threshold because of their longevity, so this might mean that there is a larger sample size for older movies
Not really a movie person. But the selection process would let the averge rating going down since the movie are betters now
QUESTION 18 · Availability and dataset coverage issues · 2/2
Student responses
older movies are harder to rwach that threshold. this will make the ones that do make it a higher weight on them which will skew the ratings trends
older movies iwll ntohav ethat many votes
Older movies that are popular are likely to reach that threshold, however, movies that haven't reached the box-office or aren't available on media could be missed, considering how some movies are stored in older methods. I don't think this would severely impact the trend in average ratings over time though considering it is already decreasing.
The older movies that have a sequel are likely to reach that, older movies when technology wasn't really accessible could be ignored.
25,000 is more extreme amount of votes compared to today. Therefore in the past, a movie with over 25,000 most likely could have been an exceptional movie to create that many. This distorts the average because the movies with less than 25k are thrown out
As the older population decreases over time, some classic movies won't be displayed because they don't meet the 25k threshold. Some of the old movies that are likely to reach the threshold include beauty and the beast, romeo and juliet, etc.
Movies are becoming more common, allowing lower-quality movies to be made. Older movies of poor qualities might also be ignored entirely.
Movies with higher ratings peobably have the 25000 ratings, and the ones missing are probably the unpopular ones because people might not want to write reviews on negative movies because not many people know aobut them. This might reflect why there is a downward trend?
People are more online now and movies trend differently then they used to
some movies that might be missing are really old movies
The average will be affected because the list will be growing. It will become more of a normal distribution
There may be new considerations for the imdb rating than what was considered before. With more variables causing the rating to change, it would cause average ratings to decline over time.
well-known older movies may still continue to attract audience but less known old movies may be forgot, so there might be biases in the selection of movies
QUESTION 18 · High-rated low-vote movies exist · 1/2
Student responses
Movies are more popular now than back then, so people watching now are more diverse, with a larger set of opinions and are less likely to collectively agree on rating a single movie as really high due to needing to cater to so many people. Meanwhile, I would assume older movies were much more niche to a specific film-watching community who were incredibly passionate, so the movies that do exist are rated higher simply due to their passion
Movies that didn't have 25k in the year they were released?
movies with great advertising. indie movies are missiong. This make bettwe movies
Older movies likely to reach that threshold today would be western films, as global media tends to have a bias of attention toward the western world. Films from countries with more developing film industries might be missing. More global exposure means more votes for films not from the west, and the audience may have a bias. More variety as well.
QUESTION 18 · High-rated low-vote movies exist · 2/2
Student responses
The movies with less votes are missing, which could change the result as less votes movies may be better. And movies get more and more votes nowadays, so there's some bias in the results
There could be some movies that don’t have as many votes but still have a very high average rating, or vice versa. Some movies weren’t as popular and didn’t get as many votes but were still very good movies with good ratings. Old movies didn’t get as many votes since those aren’t common today
QUESTION 18 · Only good older films get watched · 1/1
Student responses
older movies that people had stronger feelings about are more likely to receive enough votes to make the threshold of 25000 votes, as opposed to forgettable, middle of the pack movies that wouldnt, this would make older movies trend upwards in rating
Only the older movies that are considered to be good are likely to have 25,000 votes today, because people have heard about their greatness. Thus older movies that weren't good are not included because they do not have enough ratings. Today there are more people to watch and rate movies on these websites, so they are more likely to be rated accordingly.
people are only going to watch the old films that are good
people are unlikely to go back and watch old movies that are bad or average, so old movies that do get ratings are more likely to get positive ratings, so it seems like ratings are on a downward trend
The older movies likely to reach 25,000 reviews are likely yo be very good, as people would have to go out of their way to watch them. This drives the average ratings for older movies up, even if that isn't actually the case.
QUESTION 18 · Unclear or irrelevant response · 1/1
Student responses
1
I feel like something like nostalgia could play a larger factor in how people look back at these movies and rank them. Also, there are so many more movies out nowadays in my opinion so that could be the difference. Also I bet much older movies have less ratings unless they are good movies.
movies before 1970 like the Janpanese movie seven warriors
Older movies
QUESTION 18 · Older films lack early rating mechanisms · 1/1
Student responses
All the famous older movies that were popular before rating movies on the internet became popular would change the ratings over time
Older movies that aren't already super popular might not have a lot of ratings because rating technology didn't exist when these movies were released.
Probably very few movies from back then actually reached that threshold, so they were not accounted for in this experiment. Therefore, the mean/summaries were skewed heavily without our necessary data.