Skeda:Birthday paradox approximation.svg

Nga testwiki
Kërceni tek navigimi Kërceni tek kërkimi
Skedari origjinal (skedë SVG, fillimisht 768 × 480 pixel, madhësia e skedës: 27 KB)

Kjo skedë është nga Wikimedia Commons dhe mund të përdoret nga projektet e tjera. Përshkrimi në faqen përshkruese të skedës është treguar më poshtë.

Any autoconfirmed user can overwrite this file from the same source. Please ensure that overwrites comply with the guideline.

Përmbledhje

Përshkrimi
English: A graph comparing the accuracy of an approximation of the probability that in a room with n people (shown along the horizontal axis), some two (or more) will share a birthday. The black line, represents the computed probability. The red line represents the approximation
Español: Comparación entre la probabilidad de que dos personas (o más) en un cuarto compartan su cumpleaños (línea negra) y la aproximación:
Data
Burimi Punë e juaja
Autori Nicoguaro
SVG genesis
InfoField
 The source code of this SVG is invalid due to an error.
 This W3C-invalid plot was created with Matplotlib.
 The file size of this SVG plot may be irrationally large because its text has been converted to paths inhibiting translations.
Kodi burimor
InfoField

Python code

#from __future__ import division # Python 2
import numpy as np
from scipy.special import perm
import matplotlib.pyplot as plt
from matplotlib import rcParams

rcParams['font.family'] = 'serif'
rcParams['font.size'] = 14
rcParams['svg.fonttype'] = 'none'

num = np.linspace(1, 100, 100)
p = 1 - perm(365, num)/365.**num
p_approx = 1 - np.exp(-num**2/730)

plt.figure(figsize=(8, 5))
plt.step(num, p, "k", lw=2)
plt.plot(num, p_approx, "r", lw=1)
plt.xlabel(r"Number of people - $n$")
plt.ylabel("Probability of a pair")
plt.xlim(0, 100)
plt.ylim(0, 1)
plt.grid(True)
plt.legend([r"Probability: $1-\frac{365!}{365^n (365 - n)!}$",
            r"Approximation: $1-e^\frac{-n^2}{2\cdot 365}$"], loc=4)
plt.savefig("Birthday paradox approximation.svg")
plt.show()

Licencim

Unë, krijuesi i kësaj pune, e publikoj këtu në bazë të licensës në vijim:
w:sq:Creative Commons
atribuim
This file is licensed under the Creative Commons Attribution 4.0 International license.
Je i lirë të:
  • ta shpërndani – ta kopjoni, rishpërndani dhe përcillni punën
  • t’i bëni “remix” – të përshtatni punën
Sipas kushteve të mëposhtme:
  • atribuim – Duhet t’i jepni meritat e duhura, të siguroni një lidhje për tek licenca dhe të tregoni nëse janë bërë ndryshime. Këtë mund ta bëni në ndonjë mënyrë të arsyeshme, por jo në ndonjë mënyrë që sugjeron se licencuesi ju del zot juve apo përdorimit tuaj.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

përshkruan

11 shkurt 2016

image/svg+xml

checksum anglisht

51e1f8c32f72c3e55048195ccbff1bffb3ccbff1

data size anglisht

55.676 Bajti

450 pixel

720 pixel

Historiku i skedarit

Kliko mbi një datë/orë për ta parë skedarin siç është shfaqur në atë kohë.

Data/OraMiniaturaPërmasatPërdoruesiKoment
e tanishme20 tetor 2025 04:49Miniaturë për versionin duke filluar nga 20 tetor 2025 04:49768 × 480 (27 KB)wikimediacommons>Based5290use text for text instead of paths

faqe lidhet tek kjo skedë: