File:Reciprocal Histogram.svg

From Vigyanwiki

Original file(SVG file, nominally 720 × 288 pixels, file size: 33 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Random draws from the reciprocal distribution plotted in a log-histogram shows that the distribution of the log(x) is uniform.
Date
Source Own work
Author Bscan

Licensing

I, the copyright holder of this work, hereby publish it under the following licence:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighbouring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

N = 1000000
orig = stats.reciprocal.rvs(a=0.1, b=100, size=N)

fig, ax  = plt.subplots(1,2, figsize=(8,3.2))
hist, bins, _ = plt.hist(orig, bins=8)
plt.cla()
ax[0].hist(orig, rwidth=0.8)
ax[0].set_xlabel("x")
ax[0].set_ylabel("C(x)")
ax[0].set_ylim(0, 1e6)

logbins = np.logspace(np.log10(bins[0]),np.log10(bins[-1]),len(bins))
ax[1].hist(orig, bins=logbins, rwidth=0.8)
ax[1].set_xscale('log')
ax[1].set_xlabel("x")
ax[1].set_ylabel("C(x)")
ax[1].set_ylim(0, 5e5)

plt.tight_layout()
plt.savefig("/dbfs/FileStore/Wikipedia/reciprocal_hist.svg")
display()

Captions

Add a one-line explanation of what this file represents
Histogram and log-histogram of random deviates from the reciprocal distribution

Items portrayed in this file

depicts

1 July 2019

33,412 byte

288 pixel

720 pixel

image/svg+xml

5d6f5d2bb6558869db3ad4d0c533459a14f2a9fa

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:32, 1 July 2019Thumbnail for version as of 20:32, 1 July 2019720 × 288 (33 KB)wikimediacommons>BscanUser created page with UploadWizard

The following page uses this file:

Metadata