Introduction
Of course, your first reaction is: Come on, that show is like a hundred years old. It is from the last century, people were different back then in the dark ages. My response to anyone who really thinks this at this moment: Really? Are we really that different in light of the current political situation (sorry, different topic) and in light of the reactions to a woman taking over as the main character of a Science-Fiction/Phantasy/Time-travel/The main character can change into every shape possible? Are we really that different? Then prove me wrong. I will continue here with Star Trek: The Next Generation (TNG). And by the way, this happens to be the dataset I have available. If you can provide any other, more “modern” dataset, then I will analyze it (but only if you preprocess the data).
The current material
I collected the data in 2015 (yes, it’s been a while, but science takes time). I downloaded the transcripts for all the TNG episodes from http://www.chakoteya.net/ (many thanks to whoever transcribed the episodes), which, I’m just realizing, also has transcripts for Doctor Who (any volunteers?). I could have taken the average ratings for each episode, but I wanted to have a more fine grained data. This is why I contacted imbd.com who provided me with information on the sex of the rater and their age for all the episodes of all Star Trek franchises (thanks again!).
I decided to calculate the average rating per episode depending on the sex of the rater, as I was interested whether women would rate episodes with a higher proportion of women dialogues better than man (any guesses?). This gives me two ratings per episode: one for female raters and one for male raters. For the analysis, I transformed imdb’s 1 to 10 scale to range between 0 and 1.
I am focusing here on the dialogues of the main characters, which are Wesley, Worf, Dr. Crusher, Dr. Pulaski, Laforge, Troi, Riker, Data and Picard. I ignored all the guest characters, side kicks, Klingons, Vulcans and who ever appears on the show, mainly because it was too complicated to tag each of these characters according to their sex.
I calculated a simple measure: the main characters’ women-to-men ratio in terms of the number of words spoken in each episode. I am ignoring the name of the character (everyone loves Data) and, most importantly, I am ignoring the plot. This is important, because only in this way we can assess whether viewers have a certain preference to the sex of the characters. I would expect that female raters favor episodes in which more female characters appear.
This gives us 176 values for 176 episodes. The larger the value, the more text (measured by the number of words) the main female characters have in that episode. A ratio of 1 would mean, men and woman have an equal amount of text. Above 1, women have more text, below one, men have more text.
The following Figure illustrates the distribution of the women-to-men ratio in all episodes. It becomes very apparent that men have more text than women in TNG. There are only 9 episodes where men have less text. On average, women have roughly 34% of the text that men have (median of 22%). For analysis, I am ignoring those episodes that have more text, because excluding them makes the data better distributed (dont’t worry, I have also performed the analysis including the data and it does not change a thing).

I have used the betareg library that allows us to model values that range between 0 and 1 (the betareg library is actually designed to model ratios by means of beta-regression, that transforms probabilities ranging between 0 and 1 into logits. Hence, all statistical results presented below (i.e. beta = X), are logits. If you want to know more about logits, click here). The summary of beta-regression gives us coefficients (beta estimates), standard errors (sde), z-values (larger than 2 represents significant) and p-values (smaller than 0.05 represents significant).
I fitted the ratings with three predictors in one model.
The first predictor was the episode number in order to investigate how ratings evolved across the seasons. Indeed, the effect was significantly positive (beta = 0.028, standard error = 0.0005, z = 5.7, p < 0.001). Indeed, TNG’s ratings increased with every season. This effect is illustrated in the next plot. Although there is a strong variation within each season, the ratings got better and better. Nicely done, Star Trek producers.

Unsurprisingly, male raters gave TNG higher ratings then female raters: on a scale between 0 and 1, female raters gave on average 0.66 (beta = 0.86, sde = 0.07, z =12.7, p < 0.001), male raters gave on average 0.71 (beta = 0.23, sde = 0.8, z = 3, p = 0.003).
Now, what about the women-to-men-text ratio? Well, the effect is highly negative. The more text woman had in an episode, the worse the episode was rated (beta = -0.86, sde = 0.17, z = -5.1, p < 0.001). The following plots illustrates this effect.

Two insights follow from the figure. First, the distribution of the women-to-men-text-ratio is skewed. This that there are less episodes with more text for women. Second, that the variability in ratings is really large for episodes with a high percentage of text for male characters. One potential interpretation of this finding is that since there are fewer female-oriented eposides in the series, there is also a smaller probability that there will be a good episode episodes with higher women-to-men-text-ratios.
What is more important: female and male raters did not differ in their ratings. This means that female viewers have the same opinions about how often female characters should occur on Television like male viewers. In my opinion this result is devastating. Not only does it mean that viewers do not accept female characters to be present in Television. It also means that this opinion is supported by those who are represented by these characters: The women themselves. Given that today’s television has a strong influence on public opinion and on how each person defines their role in this society, this is absolutely unacceptable. Of course female viewers rate episodes with more female appearances worse then with more male appearances. This is what they have learned to be the status quo by watching Television.
Coming back to Doctor Who (have not forgotten this one). I claim that the reason why the latest season of Doctor Who has significantly worse ratings than all those before is simple: The main character is portrait by a woman, the plots center around female characters. For example, the episode “Rosa” that focuses on Rosa Parks. In the episode “The Tsuranga Conundrum” there is a female General. And so forth.
I totally acknowledge that the current finding has to be regarded with caution because Star Trek targets a male audience. Not only it should be replicated with Doctor Who (that started all this idea) but also with TV shows that target both sexes. Maybe someone will provide this data to me.