1. Introduction and Dataset Overview

This case study is based on the 17K Apple App Store Strategy Games dataset available on Kaggle. The dataset contains detailed metadata for 17,000+ iOS strategy games from the App Store. It includes a variety of features such as average user rating, number of user ratings, price, app size, supported languages, age rating, and more.

This analysis aims to explore how specific factors (such as number of reviews, price, and app size) influence the Average User Rating, using linear regression techniques. This section introduces the App Store Games dataset, which contains over 17,000 observations and various variables such as Average User Rating, User Rating Count, Price, Size, and Genres. The goal is to explore how some of these factors affect the game’s rating.

games <- read.csv("appstore_games.csv", stringsAsFactors = FALSE)

head(games)
##                                                                      URL
## 1                       https://apps.apple.com/us/app/sudoku/id284921427
## 2                      https://apps.apple.com/us/app/reversi/id284926400
## 3                      https://apps.apple.com/us/app/morocco/id284946595
## 4                  https://apps.apple.com/us/app/sudoku-free/id285755462
## 5                 https://apps.apple.com/us/app/senet-deluxe/id285831220
## 6 https://apps.apple.com/us/app/sudoku-classic-number-puzzle/id286210009
##          ID                           Name                Subtitle
## 1 284921427                         Sudoku                        
## 2 284926400                        Reversi                        
## 3 284946595                        Morocco                        
## 4 285755462                  Sudoku (Free)                        
## 5 285831220                   Senet Deluxe                        
## 6 286210009 Sudoku - Classic number puzzle Original brain training
##                                                                                                                   Icon.URL
## 1 https://is2-ssl.mzstatic.com/image/thumb/Purple127/v4/7d/23/c6/7d23c660-aba8-308a-05c0-19385a377c0e/source/512x512bb.jpg
## 2 https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/f7/e8/10/f7e810c8-72b4-cd85-e2d3-fbcb1e3ef381/source/512x512bb.jpg
## 3 https://is5-ssl.mzstatic.com/image/thumb/Purple118/v4/98/b2/41/98b241cc-29b7-5f67-0060-1e030f35562f/source/512x512bb.jpg
## 4 https://is3-ssl.mzstatic.com/image/thumb/Purple117/v4/64/da/aa/64daaaa4-40b5-9e9f-9d60-b936b5d2f3ca/source/512x512bb.jpg
## 5 https://is1-ssl.mzstatic.com/image/thumb/Purple118/v4/ab/2d/cf/ab2dcfe6-2178-6f74-2d42-0b6db66fc7e0/source/512x512bb.jpg
## 6 https://is1-ssl.mzstatic.com/image/thumb/Purple123/v4/69/92/8a/69928a8c-fbb4-a973-8e19-75dabba0c6a1/source/512x512bb.jpg
##   Average.User.Rating User.Rating.Count Price In.app.Purchases
## 1                 4.0              3553  2.99                 
## 2                 3.5               284  1.99                 
## 3                 3.0              8376  0.00                 
## 4                 3.5            190394  0.00                 
## 5                 3.5                28  2.99                 
## 6                 3.0                47  0.00             1.99
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Description
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Join over 21,000,000 of our fans and download one of our Sudoku games today!\\n\\nMakers of the Best Sudoku Game of 2008, Sudoku (Free), we offer you the best selling Sudoku game for iPhone with great features and 1000 unique puzzles! \\n\\nSudoku will give you many hours of fun and puzzle solving. Enjoy the challenge of solving Sudoku puzzles whenever or wherever you are using your iPhone or iPod Touch. \\n\\nOPTIONS\\n\\nAll options are on by default, but you can turn them off in the Options menu\\n\\u2022 Show Incorrect :: Shows incorrect answers in red.  \\n\\u2022 Smart Buttons :: Disables the number button when that number is completed on the game board.   \\n\\u2022 Smart Notes :: Removes the number from the notes in the box, column, and row that contains the cell with your correct answer.\\n\\nFEATURES\\n\\n\\u2022 1000 unique handcrafted puzzles\\n\\u2022 ALL puzzles solvable WITHOUT guessing\\n\\u2022 Four different skill levels\\n\\u2022 Challenge a friend\\n\\u2022 Multiple color schemes\\n\\u2022 "ALL notes": tap the "All notes" button on to show all the possible answers for each square.  Tap the "All notes" button off to remove the notes.\\n\\u2022 Hints: shows the answer for the selected square or a random square when one is not selected\\n\\u2022 Pause the game at any time and resume where you left off\\n\\u2022 Best times, progress statistics, and much more\\n\\nDo you want more? Try one of our other versions of sudoku which have all the same great features!\\n* Try Color Sudoku for a fun twist to solving sudoku puzzles. \\n* For advanced puzzle solving, try Expert Sudoku to challenge your sudoku solving skills.
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         The classic game of Reversi, also known as Othello, is a much-loved strategy board game. It is often described as taking only a minute to learn but a lifetime to master. Each game only takes a few minutes, making it ideal for your iPhone or iPod Touch. It can be played by all ages. This continues to be one of the most sought-after versions of the game for the natural AI when playing against the CPU and the refreshing, crisp graphics.\\n\\nFEATURES:\\n\\n- One or two player mode\\n- Six levels of difficulty from beginner to guru\\n- Each level has its own style of play\\n- Strong computer opponent at higher levels\\n- Fast computer play!\\n- Option for suggestions to help improve your game play\\n- Four gorgeously styled boards\\n- Unlimited undo and redo\\n- Scoreboard\\n- Auto-save game in progress\\n- Can listen to your iPod whilst playing\\n\\n"There are several free Reversi games in the app store, but none have the breadth of options or depth of AI of this paid version. AppCraver looks forward to seeing what developer Kiss The Machine comes up with next" - www.appcraver.com\\n\\n"For those who are serious about playing Reversi and want a serious AI challenge get this one" - mrbass.org best iPhone and iPod Touch games
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Play the classic strategy game Othello (also known as Reversi) on your iPhone or iPod Touch. The object is to finish the game with more of your pieces on the board than your opponent.\\n\\nFEATURES\\n\\n- Play against the iPhone or against another person.\\n- Three difficulty levels allow for casual play while still providing a challenge to experienced players.\\n- Option to show (or hide) the current legal moves. Very useful when learning to play.\\n- Option to turn on or off disc flipping animations. \\n- Automatically saves the game when you leave so you can pick it back up later.
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Top 100 free app for over a year.\\nRated "Best Sudoku Game of the Year" by Apple.\\nRated #9 Game of the Year by Apple.\\nRated #24 App of the Year by Apple with over 10,000 apps competing!\\n\\nWith unique handcrafted puzzles across four different skill levels, Sudoku (Free) is a great introduction to the fun and puzzle solving challenge of Sudoku.\\n\\nOPTIONS\\n\\nAll options are on by default, but you can turn them off in the Options menu\\n\\u2022 Show Incorrect :: Shows incorrect answers in red.  \\n\\u2022 Smart Buttons :: Disables the number button when that number is completed on the game board.   \\n\\u2022 Smart Notes :: Removes the number from the notes in the box, column, and row that contains the cell with your correct answer.\\n\\nFEATURES\\n\\n\\u2022 Multiple color schemes\\n\\u2022 Unique handcrafted puzzles\\n\\u2022 Four different skill levels\\n\\u2022 Challenge a friend\\n\\u2022 ALL puzzles are solvable WITHOUT guessing\\n\\u2022 4 color schemes\\n\\u2022 "ALL notes": tap the "All notes" button on to show all the possible answers for each square.  Tap the "All notes" button off to remove the notes.\\n\\u2022 Hints: shows the answer for the selected square or a random square when one is not selected\\n\\u2022 Pause the game at any time and resume where you left off\\n\\u2022 Best times, progress statistics, and much more\\n\\nDo you want more? Try one of our other versions of sudoku which have all the same great features!\\n* Look for our paid edition of Sudoku with 800 puzzles and more unique color schemes.  \\n* Or try Color Sudoku for a fun twist to solving sudoku puzzles. \\n* For advanced puzzle solving, try Expert Sudoku to challenge your sudoku solving skills.
## 5                                                                                                                                                                                                         "Senet Deluxe - The Ancient Game of Life and Afterlife\\n\\nSenet is an ancient Egyptian race game and the predecessor of our modern Backgammon. The oldest known form of the game is shown in a painting from the tomb of Hesy (circa 2686-2613 BCE). Many pictures of the game and artifacts have been discovered and are displayed in Museums around the world. The commonness of these finds indicates that the game was very popular in its time.\\n\\nThe main adversaries in Senet are the Spools and the Pyramids. These pawns follow a path from their start positions to the House of Horus in an inverted 'S'. The player moving all of his pawns off the board first wins. Fields on the Senet board are called houses. Some of these have special significance and are adorned with icons like the Ankh symbol. Instead of dice flattened sticks are used. Each stick has a bright side and a dark side. Every bright side is a point. If only dark sides are showing the player is awarded 5 points. When a 1, 4, or 5 is thrown the player gets another turn.\\n\\nWhen moving into a field occupied by an opponent, the pieces switch places. If, however, the opponent's pawn is part of a row of two or more, it cannot be beaten. It is possible to 'jump' over an opponent if it isn't part of a row of 3 pieces or more. 3 pieces are considered a block and are an important strategic tool.\\n\\nThrough symbology Senet hints at the afterlife as seen from an Egyptian point of view. If one's piece is beaten on one of the last three fields or the jump over the House of Water is not successful one moves back to the house of Rebirth. In such the game alludes to reincarnation and the journey of the dead.\\n\\nSenet Deluxe is a truly unique strategy game. It features great animation, a soundtrack, an intelligent adversary, enforceable backwards moves, highlighting for acceptable moves, game statistics and online help. Be prepared to spend many hours with the most popular game of the antiquity.\\n\\nFor more screenshots and several videos of the application in action, please visit the website indicated below."
## 6 Sudoku will tease your brain, challenge you or allow you to unwind and relax. With the easiest interface, it will give you the perfect Sudoku experience. Big numbers, a straight-forward toolbar for the actions you will use the most, plus all the options to personalise your game. Choose your level, from easy to expert, have your mistakes counted and duplicated numbers highlighted or choose the \\u201cPro Mode\\u201d to have no help in solving your puzzle. Get hints whenever you are stuck and \\u201cpencil in\\u201d your notes or erase entries.\\n \\nChoose among 3 themes for the look of your board: the white and elegant, for a light, modern look; the blue for a touch of originality or the dark theme, best for low light environments or to relax even more.\\n \\nTo relax or challenge yourself, for your time out or for a bit of brain training, Sudoku is the game for you. \\n \\nFeatures of Sudoku:\\n- Get a new puzzle every time. Sudoku has thousands of different boards for you, all with a unique solution.\\n- Challenge yourself with 4 difficulty levels: for beginners and experts alike.\\n- Use the Hints whenever you need a little help getting through the puzzle.\\n- Make the most of the \\u201cPencil Mode\\u201d, taking notes of all the possible numbers that could go in a cell.\\n- Duplicated numbers in a column, row or block will be highlighted for you to avoid repetitions.\\n- Erase a number or undo a move easily.\\n- Go \\u201cPro\\u201d to play as if you had pen and paper. No mistakes will be counted for you, no duplicates will be highlighted. It\\u2019s just you and your puzzle.\\n- Choose one of the amazing 3 themes: paperwhite, dark (ideal for playing with less light) and original blue.\\n- Unlock fun achievements. Can you finish a game in 30 seconds or solve a puzzle without undos? Additional challenges for additional fun.\\n- Worldwide Leaderboard to compete with players of Sudoku from all over the world.\\n \\nTake this amazing brain training with you anywhere, anytime. Download it now and start playing the classic logic puzzles with numbers straight away. Free.\\n\\nIf you have a critic, suggestion or just want to say "hi" please write us: support@outofthebit.com\\n\\nFollow us on social media:\\nFacebook/outofthebit\\nTwitter: @outofthebit
##                  Developer Age.Rating
## 1 Mighty Mighty Good Games         4+
## 2         Kiss The Machine         4+
## 3              Bayou Games         4+
## 4 Mighty Mighty Good Games         4+
## 5          RoGame Software         4+
## 6          OutOfTheBit Ltd         4+
##                                                            Languages     Size
## 1 DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH 15853568
## 2                                                                 EN 12328960
## 3                                                                 EN   674816
## 4 DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH 21552128
## 5         DA, NL, EN, FR, DE, EL, IT, JA, KO, NO, PT, RU, ZH, ES, SV 34689024
## 6                                                                 EN 48672768
##   Primary.Genre                                 Genres Original.Release.Date
## 1         Games                Games, Strategy, Puzzle            11/07/2008
## 2         Games                 Games, Strategy, Board            11/07/2008
## 3         Games                 Games, Board, Strategy            11/07/2008
## 4         Games                Games, Strategy, Puzzle            23/07/2008
## 5         Games      Games, Strategy, Board, Education            18/07/2008
## 6         Games Games, Entertainment, Strategy, Puzzle            30/07/2008
##   Current.Version.Release.Date
## 1                   30/05/2017
## 2                   17/05/2018
## 3                    5/09/2017
## 4                   30/05/2017
## 5                   22/07/2018
## 6                   29/04/2019
summary(games)
##      URL                  ID                Name             Subtitle        
##  Length:17007       Min.   :2.849e+08   Length:17007       Length:17007      
##  Class :character   1st Qu.:8.997e+08   Class :character   Class :character  
##  Mode  :character   Median :1.112e+09   Mode  :character   Mode  :character  
##                     Mean   :1.060e+09                                        
##                     3rd Qu.:1.287e+09                                        
##                     Max.   :1.475e+09                                        
##                                                                              
##    Icon.URL         Average.User.Rating User.Rating.Count     Price         
##  Length:17007       Min.   :1.000       Min.   :      5   Min.   :  0.0000  
##  Class :character   1st Qu.:3.500       1st Qu.:     12   1st Qu.:  0.0000  
##  Mode  :character   Median :4.500       Median :     46   Median :  0.0000  
##                     Mean   :4.061       Mean   :   3306   Mean   :  0.8134  
##                     3rd Qu.:4.500       3rd Qu.:    309   3rd Qu.:  0.0000  
##                     Max.   :5.000       Max.   :3032734   Max.   :179.9900  
##                     NA's   :9446        NA's   :9446      NA's   :24        
##  In.app.Purchases   Description         Developer          Age.Rating       
##  Length:17007       Length:17007       Length:17007       Length:17007      
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##   Languages              Size           Primary.Genre         Genres         
##  Length:17007       Min.   :5.133e+04   Length:17007       Length:17007      
##  Class :character   1st Qu.:2.295e+07   Class :character   Class :character  
##  Mode  :character   Median :5.677e+07   Mode  :character   Mode  :character  
##                     Mean   :1.157e+08                                        
##                     3rd Qu.:1.330e+08                                        
##                     Max.   :4.006e+09                                        
##                     NA's   :1                                                
##  Original.Release.Date Current.Version.Release.Date
##  Length:17007          Length:17007                
##  Class :character      Class :character            
##  Mode  :character      Mode  :character            
##                                                    
##                                                    
##                                                    
## 
str(games)
## 'data.frame':    17007 obs. of  18 variables:
##  $ URL                         : chr  "https://apps.apple.com/us/app/sudoku/id284921427" "https://apps.apple.com/us/app/reversi/id284926400" "https://apps.apple.com/us/app/morocco/id284946595" "https://apps.apple.com/us/app/sudoku-free/id285755462" ...
##  $ ID                          : int  284921427 284926400 284946595 285755462 285831220 286210009 286313771 286363959 286566987 286682679 ...
##  $ Name                        : chr  "Sudoku" "Reversi" "Morocco" "Sudoku (Free)" ...
##  $ Subtitle                    : chr  "" "" "" "" ...
##  $ Icon.URL                    : chr  "https://is2-ssl.mzstatic.com/image/thumb/Purple127/v4/7d/23/c6/7d23c660-aba8-308a-05c0-19385a377c0e/source/512x512bb.jpg" "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/f7/e8/10/f7e810c8-72b4-cd85-e2d3-fbcb1e3ef381/source/512x512bb.jpg" "https://is5-ssl.mzstatic.com/image/thumb/Purple118/v4/98/b2/41/98b241cc-29b7-5f67-0060-1e030f35562f/source/512x512bb.jpg" "https://is3-ssl.mzstatic.com/image/thumb/Purple117/v4/64/da/aa/64daaaa4-40b5-9e9f-9d60-b936b5d2f3ca/source/512x512bb.jpg" ...
##  $ Average.User.Rating         : num  4 3.5 3 3.5 3.5 3 2.5 2.5 2.5 2.5 ...
##  $ User.Rating.Count           : int  3553 284 8376 190394 28 47 35 125 44 184 ...
##  $ Price                       : num  2.99 1.99 0 0 2.99 0 0 0.99 0 0 ...
##  $ In.app.Purchases            : chr  "" "" "" "" ...
##  $ Description                 : chr  "Join over 21,000,000 of our fans and download one of our Sudoku games today!\\n\\nMakers of the Best Sudoku Gam"| __truncated__ "The classic game of Reversi, also known as Othello, is a much-loved strategy board game. It is often described "| __truncated__ "Play the classic strategy game Othello (also known as Reversi) on your iPhone or iPod Touch. The object is to f"| __truncated__ "Top 100 free app for over a year.\\nRated \"Best Sudoku Game of the Year\" by Apple.\\nRated #9 Game of the Yea"| __truncated__ ...
##  $ Developer                   : chr  "Mighty Mighty Good Games" "Kiss The Machine" "Bayou Games" "Mighty Mighty Good Games" ...
##  $ Age.Rating                  : chr  "4+" "4+" "4+" "4+" ...
##  $ Languages                   : chr  "DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH" "EN" "EN" "DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH" ...
##  $ Size                        : num  15853568 12328960 674816 21552128 34689024 ...
##  $ Primary.Genre               : chr  "Games" "Games" "Games" "Games" ...
##  $ Genres                      : chr  "Games, Strategy, Puzzle" "Games, Strategy, Board" "Games, Board, Strategy" "Games, Strategy, Puzzle" ...
##  $ Original.Release.Date       : chr  "11/07/2008" "11/07/2008" "11/07/2008" "23/07/2008" ...
##  $ Current.Version.Release.Date: chr  "30/05/2017" "17/05/2018" "5/09/2017" "30/05/2017" ...

2. Exploratory Data Analysis (EDA)

2.1 Basic Statistics and Description

summary(games)
##      URL                  ID                Name             Subtitle        
##  Length:17007       Min.   :2.849e+08   Length:17007       Length:17007      
##  Class :character   1st Qu.:8.997e+08   Class :character   Class :character  
##  Mode  :character   Median :1.112e+09   Mode  :character   Mode  :character  
##                     Mean   :1.060e+09                                        
##                     3rd Qu.:1.287e+09                                        
##                     Max.   :1.475e+09                                        
##                                                                              
##    Icon.URL         Average.User.Rating User.Rating.Count     Price         
##  Length:17007       Min.   :1.000       Min.   :      5   Min.   :  0.0000  
##  Class :character   1st Qu.:3.500       1st Qu.:     12   1st Qu.:  0.0000  
##  Mode  :character   Median :4.500       Median :     46   Median :  0.0000  
##                     Mean   :4.061       Mean   :   3306   Mean   :  0.8134  
##                     3rd Qu.:4.500       3rd Qu.:    309   3rd Qu.:  0.0000  
##                     Max.   :5.000       Max.   :3032734   Max.   :179.9900  
##                     NA's   :9446        NA's   :9446      NA's   :24        
##  In.app.Purchases   Description         Developer          Age.Rating       
##  Length:17007       Length:17007       Length:17007       Length:17007      
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##   Languages              Size           Primary.Genre         Genres         
##  Length:17007       Min.   :5.133e+04   Length:17007       Length:17007      
##  Class :character   1st Qu.:2.295e+07   Class :character   Class :character  
##  Mode  :character   Median :5.677e+07   Mode  :character   Mode  :character  
##                     Mean   :1.157e+08                                        
##                     3rd Qu.:1.330e+08                                        
##                     Max.   :4.006e+09                                        
##                     NA's   :1                                                
##  Original.Release.Date Current.Version.Release.Date
##  Length:17007          Length:17007                
##  Class :character      Class :character            
##  Mode  :character      Mode  :character            
##                                                    
##                                                    
##                                                    
## 
str(games)
## 'data.frame':    17007 obs. of  18 variables:
##  $ URL                         : chr  "https://apps.apple.com/us/app/sudoku/id284921427" "https://apps.apple.com/us/app/reversi/id284926400" "https://apps.apple.com/us/app/morocco/id284946595" "https://apps.apple.com/us/app/sudoku-free/id285755462" ...
##  $ ID                          : int  284921427 284926400 284946595 285755462 285831220 286210009 286313771 286363959 286566987 286682679 ...
##  $ Name                        : chr  "Sudoku" "Reversi" "Morocco" "Sudoku (Free)" ...
##  $ Subtitle                    : chr  "" "" "" "" ...
##  $ Icon.URL                    : chr  "https://is2-ssl.mzstatic.com/image/thumb/Purple127/v4/7d/23/c6/7d23c660-aba8-308a-05c0-19385a377c0e/source/512x512bb.jpg" "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/f7/e8/10/f7e810c8-72b4-cd85-e2d3-fbcb1e3ef381/source/512x512bb.jpg" "https://is5-ssl.mzstatic.com/image/thumb/Purple118/v4/98/b2/41/98b241cc-29b7-5f67-0060-1e030f35562f/source/512x512bb.jpg" "https://is3-ssl.mzstatic.com/image/thumb/Purple117/v4/64/da/aa/64daaaa4-40b5-9e9f-9d60-b936b5d2f3ca/source/512x512bb.jpg" ...
##  $ Average.User.Rating         : num  4 3.5 3 3.5 3.5 3 2.5 2.5 2.5 2.5 ...
##  $ User.Rating.Count           : int  3553 284 8376 190394 28 47 35 125 44 184 ...
##  $ Price                       : num  2.99 1.99 0 0 2.99 0 0 0.99 0 0 ...
##  $ In.app.Purchases            : chr  "" "" "" "" ...
##  $ Description                 : chr  "Join over 21,000,000 of our fans and download one of our Sudoku games today!\\n\\nMakers of the Best Sudoku Gam"| __truncated__ "The classic game of Reversi, also known as Othello, is a much-loved strategy board game. It is often described "| __truncated__ "Play the classic strategy game Othello (also known as Reversi) on your iPhone or iPod Touch. The object is to f"| __truncated__ "Top 100 free app for over a year.\\nRated \"Best Sudoku Game of the Year\" by Apple.\\nRated #9 Game of the Yea"| __truncated__ ...
##  $ Developer                   : chr  "Mighty Mighty Good Games" "Kiss The Machine" "Bayou Games" "Mighty Mighty Good Games" ...
##  $ Age.Rating                  : chr  "4+" "4+" "4+" "4+" ...
##  $ Languages                   : chr  "DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH" "EN" "EN" "DA, NL, EN, FI, FR, DE, IT, JA, KO, NB, PL, PT, RU, ZH, ES, SV, ZH" ...
##  $ Size                        : num  15853568 12328960 674816 21552128 34689024 ...
##  $ Primary.Genre               : chr  "Games" "Games" "Games" "Games" ...
##  $ Genres                      : chr  "Games, Strategy, Puzzle" "Games, Strategy, Board" "Games, Board, Strategy" "Games, Strategy, Puzzle" ...
##  $ Original.Release.Date       : chr  "11/07/2008" "11/07/2008" "11/07/2008" "23/07/2008" ...
##  $ Current.Version.Release.Date: chr  "30/05/2017" "17/05/2018" "5/09/2017" "30/05/2017" ...

2.2 Data Visualization

Scatterplot: User Rating Count vs Average User Rating

ggplot(games, aes(x = User.Rating.Count, y = Average.User.Rating)) +
  geom_point(alpha = 0.5) +
  labs(title = "User Rating Count vs Average Rating",
       x = "User Rating Count",
       y = "Average Rating") +
  theme_minimal()
## Warning: Removed 9446 rows containing missing values or values outside the scale range
## (`geom_point()`).

Boxplot: Average Rating Distribution

ggplot(games, aes(y = Average.User.Rating)) +
  geom_boxplot(fill="lightblue", color="darkblue") +
  labs(title = "Average User Rating Distribution",
       y = "Average Rating") +
  theme_minimal()
## Warning: Removed 9446 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Barplot: Genre Distribution (if available)

if("Genres" %in% names(games)) {
  genre_counts <- table(games$Genres)
  barplot(genre_counts,
          main = "Games per Genre",
          xlab = "Genre",
          ylab = "Number of Games",
          las = 2,
          col = "lightgreen")
}

3. Linear Regression Models

3.1 Simple Linear Regression (One Predictor)

model1 <- lm(Average.User.Rating ~ User.Rating.Count, data = games)
summary(model1)
## 
## Call:
## lm(formula = Average.User.Rating ~ User.Rating.Count, data = games)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0590 -0.5590  0.4221  0.4410  0.9410 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       4.059e+00  8.664e-03 468.495  < 2e-16 ***
## User.Rating.Count 5.863e-07  2.041e-07   2.873  0.00408 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7511 on 7559 degrees of freedom
##   (9446 observations deleted due to missingness)
## Multiple R-squared:  0.001091,   Adjusted R-squared:  0.0009585 
## F-statistic: 8.253 on 1 and 7559 DF,  p-value: 0.00408
SSE_model1 <- sum(model1$residuals^2)
cat("SSE of Model 1:", SSE_model1, "\n")
## SSE of Model 1: 4264.048

3.2 Multiple Linear Regression (Multiple Predictors)

predictors <- c("User.Rating.Count")
if("Price" %in% names(games)) predictors <- c(predictors, "Price")
if("Size" %in% names(games)) predictors <- c(predictors, "Size")

formula_string <- paste("Average.User.Rating ~", paste(predictors, collapse = " + "))
model2 <- lm(as.formula(formula_string), data = games)
summary(model2)
## 
## Call:
## lm(formula = as.formula(formula_string), data = games)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.0882 -0.5349  0.3088  0.4568  0.9863 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        4.033e+00  1.011e-02 398.774  < 2e-16 ***
## User.Rating.Count  5.427e-07  2.039e-07   2.661  0.00781 ** 
## Price             -3.211e-03  3.620e-03  -0.887  0.37504    
## Size               1.832e-10  3.431e-11   5.339 9.63e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7498 on 7557 degrees of freedom
##   (9446 observations deleted due to missingness)
## Multiple R-squared:  0.004844,   Adjusted R-squared:  0.004449 
## F-statistic: 12.26 on 3 and 7557 DF,  p-value: 5.33e-08
SSE_model2 <- sum(model2$residuals^2)
cat("SSE of Model 2:", SSE_model2, "\n")
## SSE of Model 2: 4248.025

4. Correlations, SSE and R-squared Analysis

numeric_vars <- games %>% select_if(is.numeric)
cor_matrix <- cor(numeric_vars, use = "complete.obs")
cor_matrix
##                              ID Average.User.Rating User.Rating.Count
## ID                   1.00000000        0.2102799134       -0.03305177
## Average.User.Rating  0.21027991        1.0000000000        0.03302477
## User.Rating.Count   -0.03305177        0.0330247705        1.00000000
## Price               -0.06853017       -0.0004143548       -0.01114928
## Size                 0.21338607        0.0616172008        0.03773621
##                             Price       Size
## ID                  -0.0685301747 0.21338607
## Average.User.Rating -0.0004143548 0.06161720
## User.Rating.Count   -0.0111492816 0.03773621
## Price                1.0000000000 0.16487107
## Size                 0.1648710662 1.00000000

5. Conclusions and Business Insights

Business implications: - Encourage user engagement to increase ratings. - Optimize app size and pricing strategy to positively affect user satisfaction.