#---------------------------------------------# # # # Dipartimento di Scienze Statistiche # # Sapienza Universita' di Roma # #---------------------------------------------# #---------------------------------------------# # # # START-R # # # # 17-21 September 2018 # # # #---------------------------------------------# #---------------------------------------------# # DAY#5: Final activity # #---------------------------------------------# # Now it is your turn. # At the bottom of the following website # https://www.lottomaticaitalia.it/it/prodotti/lotto/estrazioni # you can find the link to the zipped version of the ASCII (text) file containing the historical data of the lotto game (Italian 5-number lottery game) since 1939 # https://www.lottomaticaitalia.it/STORICO_ESTRAZIONI_LOTTO/storico.zip # Try to make your own shor/medium/long report on your investigation about these data using your recently acquired skills with RMarkdown and submit your report as .Rmd and also as .html file to luca.tardella@uniroma1.it. # Please specify "START-R my Rmd report" as subject of your email # Here is a guided list of possible question you may try to answer with your report. Please feel free to add your own favorite questions (and answers) # 1) uncompress the zipped file and import the information in the ASCII file sorico.txt in order to have a suitable data.frame named mylotto to investigate on # 2) what is the mode and the class of the object `mylotto`? # 3) How many data available do we have in the `lotto` object? How many rows? How many columns? # 5) In how many different dates there has been a draw? # 6) Which is the oldest available draw? # 7) What is the wheel for which there have been more draws? # 8) Verify the frequency distribution of all the draws. What it looks like? # 9) As you know you can bet (among others) on "ambo" i.e. a couple of distinct numbers appearing simultaneously in the five draws. Of course there are 90*89/2 possible couples of distinct numbers (ambo) you can bet on. Use the package `combinat` (install it and then load it) and its function combn(...) to list all the possible "ambo"'s. # 10) would you like to bet on a couple of numbers (ambo)? Make your best guess and find out that you would rather avoid (keeping on) betting ..... The real game works as follows: for any ambo guess you will receive 250 times your bet, but any time you bet 1 euro you have to pay it in advance.