df <- read.csv("C:\\Users\\gajaw\\OneDrive\\Desktop\\STATS\\vgsales.csv")
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

Hypothesis 1

Null Hypothesis (H0):
There is no significant difference in the average global sales of video games between the ‘Wii’ and ‘NES’ platforms.

Alternative Hypothesis (H1):
There is a significant difference in the average global sales of video games between the ‘Wii’ and ‘NES’ platforms.

Alpha Level: 0.05
Reason: Using an alpha level of 0.05 allows us to balance the risk of making a Type I error with the need for detecting significant differences. In the gaming industry, identifying differences between platforms can have major financial consequences, influencing decisions regarding game development and platform support.

Power Level: 0.80
Reason: A power level of 80% ensures that we have a high probability of detecting a true effect (if one exists). In the context of game sales, ensuring sufficient power is essential because platform decisions are costly and time-consuming, and companies want to minimize the risk of making the wrong decision (Type II error).

Minimum Effect Size: 0.5 (Cohen’s d)
Reason: A medium effect size is appropriate for detecting differences in platform sales performance. This effect size represents a practical and meaningful difference, one that can influence strategic decisions in game development, especially in terms of platform investment, marketing campaigns, and resource allocation.

Neyman - Pearson Hypothesis Testing and Fisher’s Style Test:

# Filtering data for 'Wii' and 'NES' platforms
wii_sales <- df[df$Platform == "Wii", "Global_Sales"]
nes_sales <- df[df$Platform == "NES", "Global_Sales"]
# Performing two-sample t-test
t_test_result <- t.test(wii_sales, nes_sales, var.equal = FALSE)
# Neyman-Pearson decision
alpha <- 0.05
if (t_test_result$p.value < alpha) {
  print("Reject the null hypothesis.")
} else {
  print("Fail to reject the null hypothesis.")
}
## [1] "Reject the null hypothesis."
# Fisher’s style test for variance comparison
fisher_result <- var.test(wii_sales, nes_sales)
# Interpreting the p-value
fisher_result$p.value
## [1] 3.093337e-14

The statistically significant difference in global sales between the ‘Wii’ and ‘NES’ platforms provides valuable insights into how platform evolution drives game success. The ‘Wii’ outperforms the ‘NES’ in terms of global sales, which is likely attributed to a number of factors:

Given these factors, the findings suggest that investing in newer, innovative platforms with diverse appeal can significantly boost global sales. Game developers and publishers should focus on platforms that not only offer technological improvements but also capture a wider demographic to maximize sales.

Visualization to illustrate the results of hypothesis 1

# Creating a boxplot for 'Wii' and 'NES' global sales comparison
platform_data <- df[df$Platform %in% c("Wii", "NES"), ]

ggplot(platform_data, aes(x = Platform, y = Global_Sales, fill = Platform)) +
  geom_boxplot(width = 0.6) +
  labs(title = "Comparison of Global Sales between 'Wii' and 'NES'",
       x = "Platform", y = "Global Sales (Millions)") +
  theme_minimal()

Insights:

The boxplot clearly illustrates that the ‘Wii’ platform has a significantly higher distribution of global sales compared to the ‘NES.’ The median sales for ‘Wii’ games are much higher than those of ‘NES’ games, with ‘Wii’ showing a wider range of high-selling games. There are also noticeable outliers on the ‘Wii’ platform, indicating that some games sold exceptionally well.

On the other hand, the ‘NES’ platform has a more condensed distribution with lower overall sales, reflecting its position as an older generation platform. While the ‘NES’ was revolutionary in its time, the sales data suggest that the ‘Wii’ was able to capture a broader audience and generate more commercial success.

Significance:

The boxplot clearly shows that ‘Wii’ games have significantly higher sales compared to ‘NES’ games. This suggests that platform choice plays a critical role in determining game sales. The ‘Wii’s’ advanced technology, broader market appeal, and innovative features, like motion controls, likely contributed to its superior sales performance. For game developers and marketers, investing in modern, feature-rich platforms could lead to greater commercial success.

The ‘NES,’ being an older platform, shows lower overall sales, reflecting its more limited market reach at the time.

Further Questions:

  • What specific features of the ‘Wii’ led to its higher sales?
  • How did the broader audience for ‘Wii’ influence its market performance?

Hypothesis 2

Null Hypothesis (H0):
There is no significant difference in the average global sales of ‘Sports’ and ‘Role-Playing’ games.

Alternative Hypothesis (H1):
There is a significant difference in the average global sales of ‘Sports’ and ‘Role-Playing’ games.

Alpha Level: 0.05
Reason: This standard level controls the risk of Type I error, providing confidence in the results while exploring genre-specific sales differences.

Power Level: 0.80
Reason: Ensuring adequate power (80%) means that we have a high probability of detecting a true effect if it exists. For game developers and marketers, understanding genre-specific trends is critical for making strategic decisions about which genres to prioritize in game development.

Minimum Effect Size: 0.5 (Cohen’s d)
Reason: A medium effect size allows us to detect meaningful differences in sales between ‘Sports’ and ‘Role-Playing’ genres. This is important for decision-making related to which genres may yield better commercial success and how to allocate resources effectively.

Neyman-Pearson Hypothesis Testing and Fisher’s Style Test:

# Filtering data for 'Sports' and 'Role-Playing' genres
sports_sales <- df[df$Genre == "Sports", "Global_Sales"]
rpg_sales <- df[df$Genre == "Role-Playing", "Global_Sales"]
# Performing two-sample t-test
t_test_genre_result <- t.test(sports_sales, rpg_sales, var.equal = FALSE)
# Neyman-Pearson decision
if (t_test_genre_result$p.value < alpha) {
  print("Reject the null hypothesis.")
} else {
  print("Fail to reject the null hypothesis.")
}
## [1] "Fail to reject the null hypothesis."
# Fisher’s style test for variance comparison
fisher_genre_result <- var.test(sports_sales, rpg_sales)

# Interpreting the p-value
fisher_genre_result$p.value
## [1] 0

The lack of a statistically significant difference in global sales between ‘Sports’ and ‘Role-Playing’ games suggests that both genres appeal equally to global audiences. This finding has several important implications for the gaming industry:

Visualization to illustrate the results of hypothesis 2

# Creating a boxplot for 'Sports' and 'Role-Playing' global sales comparison
genre_data <- df[df$Genre %in% c("Sports", "Role-Playing"), ]

ggplot(genre_data, aes(x = Genre, y = Global_Sales, fill = Genre)) +
  geom_boxplot(width = 0.6) +
  labs(title = "Comparison of Global Sales between 'Sports' and 'Role-Playing' Games",
       x = "Genre", y = "Global Sales (Millions)") +
  theme_minimal()

Insights:

The boxplot shows that the distribution of global sales for both ‘Sports’ and ‘Role-Playing’ games is quite similar, with no drastic differences in median sales. While there are some higher outliers in both genres, particularly in ‘Sports,’ the overall spread of sales figures is comparable.

This suggests that both ‘Sports’ and ‘Role-Playing’ games have a broad market appeal and generate similar levels of commercial success. The presence of high outliers in both genres indicates that certain popular titles, such as FIFA for ‘Sports’ and Final Fantasy for ‘Role-Playing,’ contribute significantly to the genre’s overall sales.

Significance:

The similar distribution of global sales between ‘Sports’ and ‘Role-Playing’ games suggests that both genres are equally popular and successful in the market. This indicates that game developers can expect consistent sales performance in either genre, with success depending more on individual game quality and marketing strategies.

Further questions:

  • What specific game features contribute to higher sales in each genre?

  • How do regional preferences impact the sales of ‘Sports’ vs. ‘Role-Playing’ games?S