2022: Week 6 - 7 letter Scrabble Words

Challenge by: Jenny Martin

For this challenge, we're going to take a look at 7 letter words which could be potentially high scoring in Scrabble and work out the likelihood of drawing the tiles needed to create this word. Are we going to make our lives easier by assuming that each tile drawn is an independent event and that the order tiles are drawn is irrelevant? Yes, but equally, if you have the statistical brain to calculate the probabilities as dependent events, considering all the possible orderings then we'd love to see that solution! 

Inputs

  1. 7 letter words 

  2. Scrabble Scores 

  3. Scaffold (which you may or may not need!) 

Requirements

  • Input the data
  • Parse out the information in the Scrabble Scores Input so that there are 3 fields:
    • Tile
    • Frequency
    • Points
  • Calculate the % Chance of drawing a particular tile and round to 2 decimal places
    • Frequency / Total number of tiles
  • Split each of the 7 letter words into individual letters and count the number of occurrences of each letter
  • Join each letter to its scrabble tile 
  • Update the % chance of drawing a tile based on the number of occurrences in that word
    • If the word contains more occurrences of that letter than the frequency of the tile, set the probability to 0 - it is impossible to make this word in Scrabble
    • Remember for independent events, you multiple together probabilities i.e. if a letter appears more than once in a word, you will need to multiple the % chance by itself that many times
  • Calculate the total points each word would score
  • Calculate the total % chance of drawing all the tiles necessary to create each word
  • Filter out words with a 0% chance
  • Rank the words by their % chance (dense rank)
  • Rank the words by their total points (dense rank)
  • Output the data

Output

  • 5 fields
    • Points Rank
    • Likelihood Rank
    • 7 letter word
    • % Chance
    • Total Points
  • 807 rows (808 including headers)
You can download the full outputs here

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help! 

 

Popular posts from this blog

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text