Questions tagged [probability-distribution]

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

What is it?

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

Typical examples of distributions are the uniform distribution in which each value has the same probability, the normal distribution in which the values around the avergage have a higher probability and the extreme values the lowest probability.

See also

315 questions
0
votes
0 answers

How to calculate the covariance of two binomial random variables?

Let X~Bi(n,p) and Y~Bi(n,q) where X and Y are not independent. I want to calculate Cov(X,Y)=E[XY]-E[X]E[Y] but I don't know how to calculate the first term, E[XY]. Thank you very much for your help.
0
votes
2 answers

How do we assign variables and update them in unordered maps in C++?

I am trying to implement a probability distribution of characters in the text. I am trying to learn unordered maps, but I could not update the probs map after inserting the pair. Let's say we assigned letters 'a', 'b' and 'c', I want to increment…
0
votes
2 answers

PMF and CDF from a piecewise function in R

Given p<-function(x){if ( x==-4) { 0.1 } else if (x==-1 ) { 0.2 } else if ( x==1) { 0.6 } else if (x==2 ) { 0.1 } else { 0 } How would I plot the PMF and CDF. No distribution is specified so I cant use the build in…
user15168602
0
votes
1 answer

In Statistics, a Sample is a a Single Data Point, or a Pool of Data Points?

This question has confused me a lot in statistics. I think in Statistics, a sample is a pool of data points from the PDF, rather than a single data point, am I correct? In everyday language if you sample something, for example taking a sample from a…
0
votes
1 answer

R select element by using probability proportional of the elements

is there any simple function or package to select element in the vector or list by using elements probability portions? (in R) my vector is : c(7,5,3,3,2,1,1,1,1)
0
votes
1 answer

Box Muller Transform is leaning to the right

I am building a computational simulation (Netlogo) of the spread of disinformation. For a start, I want to distribute the political preference of the population following a basic Gaussian distribution (later on I can adjust the distribution to my…
0
votes
0 answers

Broken axes in histogram and probabilistic distribution in Python

I made a histogram on the Jupyter Notebook in Python. This histogram was performed by counting the number of equilateral triangles present in a sample and measuring its lateral size. Then the relative frequency was calculated. In this histogram I…
0
votes
1 answer

Statistical meaning of pre-probability formula used in Python computer vision code? (matplotlib.image.imread)

import numpy as np import matplotlib.image as img; C = 1.0-np.mean(img.imread('circle.png'),axis=2); C /= np.sum(C); The image has 256 X 256 pixels. The resulting array C appears to be a 256 X 256 array containing probabilities of each pixel…
0
votes
1 answer

Random number from a probability distribution

I have read in a recent metaheuristic algorithm that a random number is drawn from a uniform distribution.Is there any difference/ significance in the nature of random number drawn from Normal distribution and Gaussian Distribution/Poisson…
0
votes
2 answers

How to decide the probability percentage in question

I have the below question: In the first part of the question, is says the probability that the selected person will be a male is 0.44, it means the number of males is 25*0.44 = 11. That's ok In the second part, the probability of the selected…
Gze
  • 398
  • 1
  • 12
0
votes
0 answers

Why are randomly-generated distributions from numpy.random and scipy.stats so different that their probabilities don't sum properly?

When randomly generating random numbers using the numpy.random package, and the scipy.stats package, why is the histogram (total probabilities) generated by the former package have such large values with a maximum near 4, whereas the latter's…
develarist
  • 1,224
  • 1
  • 13
  • 34
0
votes
0 answers

Use of Binomial Theorem in IP address distribution

I am currently making a project on Binomial theorem/Distribution for my semester. I need some very interesting real life applications of these to add in my project(I need to add in depth explanation of that application). I came accross these…
0
votes
0 answers

Curve fit sum of poisson function to histogram data

I am new here so I hope this post is legible/set up correctly. I am having difficulty trying to use curve_fit in python to fit histogram data to a sum of Poisson distributions. The data is a set of photon counts for different numbers of atoms. The…
0
votes
0 answers

Hash collision probability of decimal value when translated from a large binary number

I can solve basic problems of chance of dependent and independent events. The following portion of question is an excerpt of my algorithm which i am developing for an autonomous contention based queuing system to mitigate collisions in a…
0
votes
1 answer

Calculating a custom probability distribution in python (numerically)

I have a custom (discrete) probability distribution defined somewhat in the form: f(x)/(sum(f(x')) for x' in a given discrete set X). Also, 0<=x<=1. So I have been trying to implement it in python 3.8.2, and the problem is that the numerator and…