ไฟล์:Birthday paradox probability.svg
ขนาดของตัวอย่าง PNG นี้ของไฟล์ SVG นี้: 720 × 540 พิกเซล ความละเอียดอื่น: 320 × 240 พิกเซล | 640 × 480 พิกเซล | 1,024 × 768 พิกเซล | 1,280 × 960 พิกเซล | 2,560 × 1,920 พิกเซล
ดูภาพที่มีความละเอียดสูงกว่า ((ไฟล์ SVG, 720 × 540 พิกเซล, ขนาดไฟล์: 51 กิโลไบต์))
รูปภาพหรือไฟล์เสียงนี้ ต้นฉบับอยู่ที่ คอมมอนส์ รายละเอียดด้านล่าง เป็นข้อความที่แสดงผลจาก ไฟล์ต้นฉบับในคอมมอนส์
|
ความย่อ
คำอธิบายBirthday paradox probability.svg |
English: In probability theory, the birthday paradox concerns the probability that, in a set of n randomly chosen people, some pair of them will have the same birthday. By the pigeonhole principle, the probability reaches 100% when the number of people reaches 367 (since there are 366 possible birthdays, including February 29). However, 99% probability is reached with just 57 people, and 50% probability with 23 people. These conclusions are based on the assumption that each day of the year (except February 29) is equally probable for a birthday. |
วันที่ | |
แหล่งที่มา | งานของตัว |
ผู้สร้างสรรค์ | Guillaume Jacquenot |
SVG genesis InfoField | ซอร์สโค้ดของ SVG นี้ตรวจสอบถูกต้องแล้ว ไฟล์ภาพกราฟิกส์เวกเตอร์นี้ สร้างขึ้นโดยใช้ Matplotlib |
รหัสต้นฉบับ InfoField | Python code# -*- coding: utf-8 -*-
#
# Script to generate in English and French, graphs for the
# birthday problem.
#
# **************************************************************
# http://en.wikipedia.org/wiki/Birthday_problem
# From Wikipedia, the free encyclopedia:
# In probability theory, the birthday problem or birthday
# paradox concerns the probability that, in a set of n
# randomly chosen people, some pair of them will have the
# same birthday. By the pigeonhole principle, the probability
# reaches 100% when the number of people reaches 367
# (since there are 366 possible birthdays, including February
# 29). However, 99% probability is reached with just 57 people,
# and 50% probability with 23 people. These conclusions are
# based on the assumption that each day of the year (except
# February 29) is equally probable for a birthday.
#
# The mathematics behind this problem led to a well-known
# cryptographic attack called the birthday attack, which
# uses this probabilistic model to reduce the complexity
# of cracking a hash function.
#
# Text under the
# Creative Commons Attribution-ShareAlike License
# **************************************************************
#
#
# Guillaume Jacquenot
# 2012/12/16
from pylab import *
import numpy as np
def makePlot(
generateEnglishPlot = True,
outputFilename = r'Birthday_paradox.svg',
useYLogScale = False):
N=91
n = np.arange(float(N))
pbar=np.exp(-n* (n-1) / (2.0*365.0))
p=1.0-pbar
n05 = 0.5*(1.0+np.sqrt(1-8.0*365.0*np.log(1.0-0.5)))
plot([n05,n05],[0.0,0.5],c='k', linestyle='--')
plot([0.0,n05],[0.5,0.5],c='k', linestyle='--')
text(23.5,0.02,' ~23')
if generateEnglishPlot:
plot(n,p ,c='r',label = unicode('Probability of a pair', 'utf8'))
plot(n,pbar,c='b',label = unicode('Probability of no matching pair', 'utf8'))
else:
plot(n,p ,c='r',label = unicode('Probabilité de coïncidence', 'utf8'))
plot(n,pbar,c='b',label = unicode('Probabilité de non-coïncidence', 'utf8'))
legend(loc='right')
xlim(0, N)
if useYLogScale:
ylim(1e-6, 1)
ax = gca()
ax.set_yscale('log')
else:
ylim(0, 1)
yticks([0.0,0.2,0.4,0.5,0.6,0.8,1.0])
xticks(range(0, N, 10))
grid(True, ls='-', c='#a0a0a0')
if generateEnglishPlot:
xlabel('Number of people')
ylabel('Probability')
else:
xlabel('Nombre de personnes')
ylabel(unicode('Probabilité', 'utf8'))
savefig(outputFilename)
show()
makePlot(generateEnglishPlot = True, outputFilename = r'Birthday_paradox.svg')
makePlot(generateEnglishPlot = False, outputFilename = r'Paradoxe_anniversaire.svg')
|
การอนุญาตใช้สิทธิ
ข้าพเจ้า ในฐานะผู้ถือลิขสิทธิ์ของภาพหรือสื่อนี้ อนุญาตให้ใช้ภาพหรือสื่อนี้ภายใต้เงื่อนไขต่อไปนี้
ไฟล์นี้อยู่ภายใต้สัญญาอนุญาต ครีเอทีฟคอมมอนส์ แบบแสดงที่มา-อนุญาตแบบเดียวกัน 3.0 ต้นฉบับ
- คุณสามารถ:
- ที่จะแบ่งปัน – ที่จะทำสำเนา แจกจ่าย และส่งงานดังกล่าวต่อไป
- ที่จะเรียบเรียงใหม่ – ที่จะดัดแปลงงานดังกล่าว
- ภายใต้เงื่อนไขต่อไปนี้:
- แสดงที่มา – คุณต้องให้เกียรติเจ้าของงานอย่างเหมาะสม โดยเพิ่มลิงก์ไปยังสัญญาอนุญาต และระบุหากมีการเปลี่ยนแปลง คุณอาจทำเช่นนี้ได้ในรูปแบบใดก็ได้ตามควร แต่ต้องไม่ใช่ในลักษณะที่แนะว่าผู้ให้อนุญาตสนับสนุนคุณหรือการใช้งานของคุณ
- อนุญาตแบบเดียวกัน – หากคุณดัดแปลง เปลี่ยนรูป หรือต่อเติมงานนี้ คุณต้องใช้สัญญาอนุญาตแบบเดียวกันหรือแบบที่เหมือนกับสัญญาอนุญาตที่ใช้กับงานนี้เท่านั้น
ไอเทมที่แสดงอยู่ในไฟล์นี้
ประกอบด้วย
16 ธันวาคม 2012
media type อังกฤษ
image/svg+xml
checksum อังกฤษ
3b38941255998a827e98c5fab5e563dc1bf89d10
data size อังกฤษ
52,556 ไบต์
540 พิกเซล
720 พิกเซล
ประวัติไฟล์
คลิกวันที่/เวลาเพื่อดูไฟล์ที่ปรากฏในขณะนั้น
วันที่/เวลา | รูปย่อ | ขนาด | ผู้ใช้ | ความเห็น | |
---|---|---|---|---|---|
ปัจจุบัน | 04:01, 17 ธันวาคม 2555 | 720 × 540 (51 กิโลไบต์) | Gjacquenot | User created page with UploadWizard |
หน้าที่มีภาพนี้
หน้าต่อไปนี้ โยงมาที่ภาพนี้:
การใช้ไฟล์ข้ามโครงการ
วิกิอื่นต่อไปนี้ใช้ไฟล์นี้:
- การใช้บน de.wikipedia.org
- การใช้บน en.wikipedia.org
- การใช้บน sq.wikipedia.org
- การใช้บน tr.wikipedia.org
ข้อมูลเกี่ยวกับภาพ
ภาพนี้มีข้อมูลเพิ่มเติม ซึ่งส่วนใหญ่มาจากกล้องดิจิตอลหรือสแกนเนอร์ที่สามารถเก็บข้อมูลดังกล่าวไว้รวมกับภาพได้ ถ้าภาพนี้ถูกปรับปรุงแก้ไขหรือเปลี่ยนแปลงจากเดิม ข้อมูลบางอย่างจะยังคงไม่เปลี่ยนแปลงเหมือนภาพที่ถูกปรับปรุงแก้ไขนั้น
ความกว้าง | 576pt |
---|---|
ความสูง | 432pt |