SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
Pythonで一攫千金

       かわ




  2010/06/26 ニコ生勉強会
Kawa
Kawa = {
      'Twittwer' : '@kawa1128',
      'Hatena' : 'id:kawa1128',
      'NicoNico' : 'co70366',
      'web' : '
      http://www.kawa1128.jp/',
      }
なぜ?
● 一家に一匹、きりんを買う時代です。
● むしろ、ペンギンの方がいいですが、個人的には。


● いずれにしてもお金がかかる。


● 一等前後賞で3億円とまでいかなくても。。。


● かと言って41個のなかから5つって当たる気がしない。




    よし、miniロトだ!!
もしかして、、、、、
● 何事も傾向と対策が重要です。(裏切ら
  れることも多いです。)
● 適当に買って楽しむのも一興。


● でも、実は、数字の出現頻度にはばらつ

  きがあるのでは?


    よし、Pythonで調べよう!!
とりあえず、
●   何はともあれ、データを引っ張ってこなければ。。。




スクレイパーをPythonで書いてみた。
Db部分も含めて、たった200行程度。

BeautifulSoup万歳!!
結果
1     2     3    4     5     6    7    8    9    10

75    93    86   88    87    79   86   90   77   102

11    12    13   14    15    16   17   18   19   20

106   83    93   95    80    98   97   89   96   96

21    22    23   24    25    26   27   28   29   30

90    101   99   101   91    88   95   92   89   97

31

91                          Mean91.29
                            Sd   7.39
                            X^2 18.56(96%)
結果
1    2    3    4    5     6    7    8    9    10

4    5    4    5    4     4    4    4    3    3

11   12   13   14   15    16   17   18   19   20

4    3    2    1    3     6    6    5    5    2

21   22   23   24   25    26   27   28   29   30

1    6    6    6    0     4    1    7    9    6

31

3                        Mean 4.16
                         Sd   1.86
                         X^2 25.96(70%)
でも、でも、
●   試行回数が増えれば、出現頻度は、ランダムになる
    はず!

●   じゃあ、今まで多く出ていて、最近でていない数字を
    狙えばよいか?
さらに、さらに
●   出現頻度に偏りはなかった。
●   マルコフ連鎖を使ってみよう!!
マルコフ連鎖?
●   マルコフ連鎖とは、確率過程の一種であるマルコフ過程の
    うち、とりうる状態が離散的(有限または可算)なもの(離散
    状態マルコフ過程)をいう。また特に、時間が離散的なもの
    (時刻は添え字で表される)を指すことが多い(他に連続時
    間マルコフ過程というものもあり、これは時刻が連続であ
    る)。マルコフ連鎖は、未来の挙動が現在の値だけで決定さ
    れ、過去の挙動と無関係である(マルコフ性)。各時刻にお
    いて起こる状態変化(遷移または推移)に関して、マルコフ
    連鎖は遷移確率が過去の状態によらず、現在の状態のみ
    による系列である。特に重要な確率過程として、様々な分野
    に応用される。 by Wikipwdia

          詳しくはggrように!!
ロジック
●   過去すべての出現頻度
●   ここ1ヶ月の出現頻度を引く
●   確率の高いものから、連鎖で6つ決定!
コンクルージョン


ミニロトをかったつもりになって、
それを貯金が一番早道。


          年に2回くらい4等が当たるようです。

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

一攫

  • 1. Pythonで一攫千金 かわ 2010/06/26 ニコ生勉強会
  • 2. Kawa Kawa = { 'Twittwer' : '@kawa1128', 'Hatena' : 'id:kawa1128', 'NicoNico' : 'co70366', 'web' : ' http://www.kawa1128.jp/', }
  • 3. なぜ? ● 一家に一匹、きりんを買う時代です。 ● むしろ、ペンギンの方がいいですが、個人的には。 ● いずれにしてもお金がかかる。 ● 一等前後賞で3億円とまでいかなくても。。。 ● かと言って41個のなかから5つって当たる気がしない。 よし、miniロトだ!!
  • 4. もしかして、、、、、 ● 何事も傾向と対策が重要です。(裏切ら れることも多いです。) ● 適当に買って楽しむのも一興。 ● でも、実は、数字の出現頻度にはばらつ きがあるのでは? よし、Pythonで調べよう!!
  • 5. とりあえず、 ● 何はともあれ、データを引っ張ってこなければ。。。 スクレイパーをPythonで書いてみた。 Db部分も含めて、たった200行程度。 BeautifulSoup万歳!!
  • 6. 結果 1 2 3 4 5 6 7 8 9 10 75 93 86 88 87 79 86 90 77 102 11 12 13 14 15 16 17 18 19 20 106 83 93 95 80 98 97 89 96 96 21 22 23 24 25 26 27 28 29 30 90 101 99 101 91 88 95 92 89 97 31 91 Mean91.29 Sd 7.39 X^2 18.56(96%)
  • 7. 結果 1 2 3 4 5 6 7 8 9 10 4 5 4 5 4 4 4 4 3 3 11 12 13 14 15 16 17 18 19 20 4 3 2 1 3 6 6 5 5 2 21 22 23 24 25 26 27 28 29 30 1 6 6 6 0 4 1 7 9 6 31 3 Mean 4.16 Sd 1.86 X^2 25.96(70%)
  • 8. でも、でも、 ● 試行回数が増えれば、出現頻度は、ランダムになる はず! ● じゃあ、今まで多く出ていて、最近でていない数字を 狙えばよいか?
  • 9. さらに、さらに ● 出現頻度に偏りはなかった。 ● マルコフ連鎖を使ってみよう!!
  • 10. マルコフ連鎖? ● マルコフ連鎖とは、確率過程の一種であるマルコフ過程の うち、とりうる状態が離散的(有限または可算)なもの(離散 状態マルコフ過程)をいう。また特に、時間が離散的なもの (時刻は添え字で表される)を指すことが多い(他に連続時 間マルコフ過程というものもあり、これは時刻が連続であ る)。マルコフ連鎖は、未来の挙動が現在の値だけで決定さ れ、過去の挙動と無関係である(マルコフ性)。各時刻にお いて起こる状態変化(遷移または推移)に関して、マルコフ 連鎖は遷移確率が過去の状態によらず、現在の状態のみ による系列である。特に重要な確率過程として、様々な分野 に応用される。 by Wikipwdia 詳しくはggrように!!
  • 11. ロジック ● 過去すべての出現頻度 ● ここ1ヶ月の出現頻度を引く ● 確率の高いものから、連鎖で6つ決定!