ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¾÷²v°ÝÃD(EX:39­Ó¸¹½X,¤­­Ó¸¹½X³£¦b1~19ªº¾÷²v)

[µo°Ý] ¾÷²v°ÝÃD(EX:39­Ó¸¹½X,¤­­Ó¸¹½X³£¦b1~19ªº¾÷²v)

·Q½Ð°Ý¦U¦ì¤j¤j
³o­Ó¾÷²v°ÝÃD¤p§Ì«ä¦Ò¤F«Ü¤[¤´¤£ª¾¹Dºâªk...

¨Ò¦p
1~39ªº¸¹½X,¤@¦¸©â¤­­Ó¸¹½X¡B¤£±o­«½Æ

³o¤­­Ó¸¹½X³£¥X²{¦b1~19ªº¾÷²v¬O¦h¤Ö?
¥|­Ó¸¹½X³£¥X²{¦b1~19ªº¾÷²v¬O¦h¤Ö?
¤T­Ó¸¹½X³£¥X²{¦b1~19ªº¾÷²v¬O¦h¤Ö?
¤G­Ó¸¹½X³£¥X²{¦b1~19ªº¾÷²v¬O¦h¤Ö?
¥u¦³1­Ó¸¹½X¥X²{¦b1~19ªº¾÷²v¬O¦h¤Ö?
PKKO

¦^´_ 1# PKKO
±Æ¦C²Õ¦X¤¤  C(n,r)=n!/[r!*(n-r)!] ¡A!ªí¥Ü¶¥¼h

¤­­Ó¸¹½X³£¥X²{¦b1~19¡A¾÷²v = C(19,5)/C(39,5) = 0.020196
¥u¦³¥|­Ó¸¹½X¥X²{¦b1~19¡A¾÷²v =C(19,4)*C(20,1)/C(39,5) = 0.13464
¥u¦³¤T­Ó¸¹½X¥X²{¦b1~19¡A¾÷²v =C(19,3)*C(20,2)/C(39,5) = 0.31977
¥u¦³¨â­Ó¸¹½X¥X²{¦b1~19¡A¾÷²v =C(19,2)*C(20,3)/C(39,5) = 0.33858
¥u¦³¤@­Ó¸¹½X¥X²{¦b1~19¡A¾÷²v =C(19,1)*C(20,4)/C(39,5) = 0.15989
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00


    S¤j¤j,§Ú¤ß¤¤¥Rº¡¤F·P¿E,¥u¯à»¡·PÁ·PÁ¦A·PÁÂ

¨S·Q¨ì±z³s³oºØ¼Æ¾ÇÃD¥Ø³£¯à¦p¦¹¸ÔºÉªº»¡©ú,¯u¬O¤Ó·PÁÂ

·Q¦A½Ð±Ð¤@¤U,­Y¥HVBA¼¶¼gµ{¦¡½X

C(39,5)

¸Ó¦p¦ó¼¶¼gµ{¦¡½X©O?
PKKO

TOP

¦^´_ 3# PKKO
  1. 'n¶¥¼h , return double
  2. Function dblFactorial(n As Integer) As Double
  3.     dblFactorial = 1
  4.     For i = 1 To n
  5.         dblFactorial = dblFactorial * i
  6.     Next
  7. End Function

  8. '²Õ¦X
  9. Function dblCombination(n As Integer, r As Integer) As Double
  10.     'By formula method:
  11.     dblCombination = dblFactorial(n) / (dblFactorial(r) * dblFactorial(n - r))
  12.    
  13. '    'Speedup method (less multiply computations , allowed larger n):
  14. '    dblCombination = 1
  15. '    For i = 1 To Application.Min(r, n - r)
  16. '        dblCombination = dblCombination * (n - i + 1)
  17. '    Next
  18. '    dblCombination = dblCombination / dblFactorial(Application.Min(r, n - r))
  19. End Function

  20. Sub Test()
  21.     MsgBox "¤­­Ó¸¹½X³£¥X²{¦b1~19¡A¾÷²v = " & Format(dblCombination(19, 5) / dblCombination(39, 5), "0.000000")
  22. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD