Queer European MD passionate about IT
Procházet zdrojové kódy

Update Mission288Solutions.ipynb

darinbradley před 2 roky
rodič
revize
44933bc8cc
1 změnil soubory, kde provedl 27 přidání a 27 odebrání
  1. 27 27
      Mission288Solutions.ipynb

+ 27 - 27
Mission288Solutions.ipynb

@@ -6,11 +6,11 @@
    "source": [
     "# Is Fandango Still Inflating Ratings?\n",
     "\n",
-    "In October 2015, Walt Hickey from FiveThirtyEight published [a popular article](https://fivethirtyeight.com/features/fandango-movies-ratings/) where he presented strong evidence which suggest that Fandango's movie rating system was biased and dishonest. In this project, we'll analyze more recent movie ratings data to determine whether there has been any change in Fandango's rating system after Hickey's analysis.\n",
+    "In October 2015, Walt Hickey from FiveThirtyEight published [a popular article](https://fivethirtyeight.com/features/fandango-movies-ratings/) where he presented strong evidence that suggests that Fandango's movie rating system was biased and dishonest. In this project, we'll analyze more recent movie ratings data to determine whether there has been any change in Fandango's rating system following Hickey's analysis.\n",
     "\n",
     "# Understanding the Data\n",
     "\n",
-    "We'll work with two samples of movie ratings:the data in one sample was collected _previous_ to Hickey's analysis, while the other sample was collected _after_. Let's start by reading in the two samples (which are stored as CSV files) and getting familiar with their structure."
+    "We'll work with two samples of movie ratings: the data in one sample was collected _prior_ to Hickey's analysis, while the other sample was collected _after_. Let's start by reading in the two samples (which are stored as CSV files) and exploring their structure."
    ]
   },
   {
@@ -322,7 +322,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Below we isolate only the columns that provide information about Fandango so we make the relevant data more readily available for later use. We'll make copies [to avoid any `SettingWithCopyWarning`](https://www.dataquest.io/blog/settingwithcopywarning/) later on. "
+    "Below we isolate only the columns that provide information about Fandango to make the relevant data more readily available for later use. We'll make copies [to avoid any `SettingWithCopyWarning`](https://www.dataquest.io/blog/settingwithcopywarning/) later on. "
    ]
   },
   {
@@ -486,25 +486,25 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Our goal is to determine whether there has been any change in Fandango's rating system after Hickey's analysis. The population of interest for our analysis is made of all the movie ratings stored on Fandango's website, regardless of the releasing year.\n",
+    "Our goal is to determine whether there has been any change in Fandango's rating system following Hickey's analysis. The population of interest for our analysis comprises all the movie ratings stored on Fandango's website, regardless of the releasing year.\n",
     "\n",
-    "Because we want to find out whether the parameters of this population changed after Hickey's analysis, we're interested in sampling the population at two different periods in time — previous and after Hickey's analysis — so we can compare the two states.\n",
+    "Because we want to determine if the parameters of this population changed after Hickey's analysis, we're interested in sampling the population at two different periods in time — before and after Hickey's analysis — so we can compare the two states.\n",
     "\n",
-    "The data we're working with was sampled at the moments we want: one sample was taken previous to the analysis, and the other after the analysis. We want to describe the population, so we need to make sure that the samples are representative, otherwise we should expect a large sampling error and, ultimately, wrong conclusions.\n",
+    "The data we're working with was sampled at the moments we want: one sample was taken prior to the analysis, and the other was taken after the analysis. We want to describe the population, so we need to make sure that the samples are representative; otherwise, we should expect a large sampling error and, ultimately, inaccurate conclusions.\n",
     "\n",
     "From Hickey's article and from the `README.md` of [the data set's repository](https://github.com/fivethirtyeight/data/tree/master/fandango), we can see that he used the following sampling criteria:\n",
     "\n",
     "* The movie must have had at least 30 fan ratings on Fandango's website at the time of sampling (Aug. 24, 2015).\n",
     "* The movie must have had tickets on sale in 2015.\n",
     "\n",
-    "The sampling was clearly not random because not every movie had the same chance to be included in the sample — some movies didn't have a chance at all (like those having under 30 fan ratings or those without tickets on sale in 2015). It's questionable whether this sample is representative of the entire population we're interested to describe. It seems more likely that it isn't, mostly because this sample is subject to *temporal trends* — e.g. movies in 2015 might have been outstandingly good or bad compared to other years.\n",
+    "The sampling was clearly not random because not every movie had the same chance to be included in the sample — some movies didn't have a chance at all (like those having under 30 fan ratings or those without tickets on sale in 2015). It's questionable whether this sample is representative of the entire population we're interested in describing. It seems more likely that it isn't, mostly because this sample is subject to *temporal trends* (e.g., movies in 2015 might have been outstandingly good or bad compared to other years).\n",
     "\n",
-    "The sampling conditions for our other sample were (as it can be read in the `README.md` of [the data set's repository](https://github.com/mircealex/Movie_ratings_2016_17)):\n",
+    "The sampling conditions for our other sample were the following (as it can be read in the `README.md` of [the data set's repository](https://github.com/mircealex/Movie_ratings_2016_17)):\n",
     "\n",
     "* The movie must have been released in 2016 or later.\n",
-    "* The movie must have had a considerable number of votes and reviews (unclear how many from the `README.md` or from the data).\n",
+    "* The movie must have had a considerable number of votes and reviews (it's unclear how many from the `README.md` or from the data).\n",
     "\n",
-    "This second sample is also subject to temporal trends and it's unlikely to be representative of our population of interest.\n",
+    "This second sample is also subject to temporal trends, and it's unlikely to be representative of our population of interest.\n",
     "\n",
     "Both these authors had certain research questions in mind when they sampled the data, and they used a set of criteria to get a sample that would fit their questions. Their sampling method is called [**purposive sampling**](https://youtu.be/CdK7N_kTzHI) (or judgmental/selective/subjective sampling). While these samples were good enough for their research, they don't seem too useful for us.\n",
     "\n",
@@ -512,7 +512,7 @@
     "\n",
     "At this point, we can either collect new data or change our the goal of our analysis. We choose the latter and place some limitations on our initial goal.\n",
     "\n",
-    "Instead of trying to determine whether there has been any change in Fandango's rating system after Hickey's analysis, our new goal is to determine whether there's any difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. This new goal should also be a fairly good proxy for our initial goal.\n",
+    "Instead of trying to determine whether there has been any change in Fandango's rating system following Hickey's analysis, our new goal is to determine whether there's any difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. This new goal should also be a fairly good proxy for our initial goal.\n",
     "\n",
     "# Isolating the Samples We Need\n",
     "\n",
@@ -525,7 +525,7 @@
     "\n",
     "Although one of the sampling criteria in our second sample is movie popularity, the sample doesn't provide information about the number of fan ratings. We should be skeptical once more and ask whether this sample is truly representative and contains popular movies (movies with over 30 fan ratings).\n",
     "\n",
-    "One quick way to check the representativity of this sample is to sample randomly 10 movies from it and then check the number of fan ratings ourselves on Fandango's website. Ideally, at least 8 out of the 10 movies have 30 fan ratings or more."
+    "One quick way to check the representativity of this sample is to randomly sample 10 movies from it and then check the number of fan ratings ourselves on Fandango's website. Ideally, at least 8 out of the 10 movies have 30 fan ratings or more."
    ]
   },
   {
@@ -711,9 +711,9 @@
     "</table>\n",
     "\n",
     "\n",
-    "90% of the movies in our sample are popular. This is enough and we move forward with a bit more confidence.\n",
+    "90% of the movies in our sample are popular. This is enough for us to move forward with a bit more confidence.\n",
     "\n",
-    "Let's also double-check the other data set for popular movies. The documentation states clearly that there're only movies with at least 30 fan ratings, but it should take only a couple of seconds to double-check here."
+    "Let's also double-check the other dataset for popular movies. The documentation states clearly that there are only movies with at least 30 fan ratings, but it should take only a couple of seconds to double-check here."
    ]
   },
   {
@@ -740,9 +740,9 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "If you explore the two data sets, you'll notice that there are movies with a releasing year different than 2015 or 2016. For our purposes, we'll need to isolate only the movies released in 2015 and 2016.\n",
+    "If you explore the two datasets, you'll notice that there are movies with a release year different than 2015 or 2016. For our purposes, we'll need to isolate only the movies released in 2015 and 2016.\n",
     "\n",
-    "Let's start with Hickey's data set and isolate only the movies released in 2015. There's no special column for the releasing year, but we should be able to extract it from the strings in the `FILM` column."
+    "Let's start with Hickey's dataset and isolate only the movies released in 2015. There's no special column for the releasing year, but we should be able to extract it from the strings in the `FILM` column."
    ]
   },
   {
@@ -950,7 +950,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Great, now let's isolate the movies in the other data set."
+    "Great! Now, let's isolate the movies in the other dataset."
    ]
   },
   {
@@ -1066,7 +1066,7 @@
    "source": [
     "# Comparing Distribution Shapes for 2015 and 2016\n",
     "\n",
-    "Our aim is to figure out whether there's any difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. One way to go about is to analyze and compare the distributions of movie ratings for the two samples.\n",
+    "Our goal is to determine whether or not there is any difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. One way to do this is to analyze and compare the distributions of movie ratings for the two samples.\n",
     "\n",
     "We'll start with comparing the shape of the two distributions using kernel density plots. We'll use [the FiveThirtyEight style](https://www.dataquest.io/blog/making-538-plots/) for the plots."
    ]
@@ -1108,18 +1108,18 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Two aspects are striking on the figure above:\n",
-    "* Both distributions are strongly left skewed.\n",
+    "Two aspects are interesting in the figure above:\n",
+    "* Both distributions are strongly left-skewed.\n",
     "* The 2016 distribution is slightly shifted to the left relative to the 2015 distribution.\n",
     "\n",
-    "The left skew suggests that movies on Fandango are given mostly high and very high fan ratings. Coupled with the fact that Fandango sells tickets, the high ratings are a bit dubious. It'd be really interesting to investigate this further — ideally in a separate project, since this is quite irrelevant for the current goal of our analysis.\n",
+    "The left skew suggests that movies on Fandango are given mostly high and very high fan ratings. Coupled with the fact that Fandango sells tickets, the high ratings are a bit dubious. It'd be really interesting to investigate this further — ideally in a separate project, since this is irrelevant for the current goal of our analysis.\n",
     "\n",
     "The slight left shift of the 2016 distribution is very interesting for our analysis. It shows that ratings were slightly lower in 2016 compared to 2015. This suggests that there was a difference indeed between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. We can also see the direction of the difference: the ratings in 2016 were slightly lower compared to 2015.\n",
     "\n",
     "\n",
     "# Comparing Relative Frequencies\n",
     "\n",
-    "It seems we're following a good thread so far, but we need to analyze more granular information. Let's examine the frequency tables of the two distributions to analyze some numbers. Because the data sets have different numbers of movies, we normalize the tables and show percentages instead."
+    "It seems we're following a good thread so far, but we need to analyze more granular information. Let's examine the frequency tables of the two distributions to analyze some numbers. Because the datasets have different numbers of movies, we normalize the tables and show percentages instead."
    ]
   },
   {
@@ -1200,11 +1200,11 @@
     "\n",
     "The minimum rating is also lower in 2016 — 2.5 instead of 3 stars, the minimum of 2015. There clearly is a difference between the two frequency distributions.\n",
     "\n",
-    "For some other ratings, the percentage went up in 2016. There was a greater percentage of movies in 2016 that received 3.5 and 4 stars, compared to 2015. 3.5 and 4.0 are high ratings and this challenges the direction of the change we saw on the kernel density plots.\n",
+    "For some other ratings, the percentage went up in 2016. There was a greater percentage of movies in 2016 that received 3.5 and 4 stars, compared to 2015. 3.5 and 4.0 are high ratings, and this challenges the direction of the change we saw on the kernel density plots.\n",
     "\n",
     "# Determining the Direction of the Change\n",
     "\n",
-    "Let's take a couple of summary metrics to get a more precise picture about the direction of the change. In what follows, we'll compute the mean, the median, and the mode for both distributions and then use a bar graph to plot the values."
+    "Let's take a couple of summary metrics for more precise information about the direction of the change. In what follows, we'll compute the mean, the median, and the mode for both distributions, and then we'll use a bar graph to plot the values."
    ]
   },
   {
@@ -1351,9 +1351,9 @@
     "\n",
     "# Conclusion\n",
     "\n",
-    "Our analysis showed that there's indeed a slight difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. We also determined that, on average, popular movies released in 2016 were rated lower on Fandango than popular movies released in 2015.\n",
+    "Our analysis showed that there is indeed a slight difference between Fandango's ratings for popular movies in 2015 and Fandango's ratings for popular movies in 2016. We also determined that, on average, popular movies released in 2016 were rated lower on Fandango than popular movies released in 2015.\n",
     "\n",
-    "We cannot be completely sure what caused the change, but the chances are very high that it was caused by Fandango fixing the biased rating system after Hickey's analysis."
+    "We cannot be completely sure what caused the change, but the chances are very high that it was caused by Fandango fixing the biased rating system following Hickey's analysis."
    ]
   }
  ],
@@ -1373,7 +1373,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.6.4"
+   "version": "3.8.5"
   }
  },
  "nbformat": 4,