1
$\begingroup$

I am just finished my first ever course in statistics and trying to apply it to first ever research problem, so following question might seem little naive.

I have data in form of microscopy images of really small particles(see figure below). My hypothesis is that the size distribution (in terms of number of particles for any given area) determined by an automatic script follows the model where observation is sum of shot noise (following exponential distribution) and particle sizes (following log normal distribution).

Can give hints as to how to proceed? I am bit stuck in translating my model to actual equations. Specially how to specify the relation between area and number of observations (tutorials mostly use some polynomials for teaching, but am not sure here.). Below is my attempt:

$$ Obs \sim \chi_{shot} + \chi_{particle} + 3.0\\ \chi_{shot} \sim Exponential(\lambda)\\ \chi_{particle} \sim LogNormal(\mu,\sigma)\\ \lambda \sim Normal(4.0, 2.5) \\ \mu \sim Normal(13.0,5.0\\ \sigma \sim GammaInverse(5.0, 0.5) $$

Here is my failed attempt in numpyro before I gave up

def model(num):
    # smallest observed particle size is 3.0
    lambda_ = npr.sample("lambda_", npr.distributions.Normal(4.0,2.5))
    noise = npr.sample("noise", npr.distributions.Exponential(lambda_))
    pixel_noise = noise + 3.0
    puncta_avg = npr.sample("puncta_avg",npr.distributions.Normal(13.0,5.0))
    puncta_sigma = npr.sample("puncta_sigma",npr.distributions.InverseGamma(5.0,0.5))
    puncta_observed = npr.sample("puncta_observed", npr.distributions.LogNormal(puncta_avg, puncta_sigma))
    observations = npr.sample("obs",puncta_observed + pixel_noise, obs=num)

Histogram of data for help.

histogram

Even simple gentle nudge will be helpful.

$\endgroup$
6
  • 4
    $\begingroup$ Not sure of your objective. In what way does your histogram deserve to be called a 'failed attempt"? $\endgroup$
    – BruceET
    Commented Jan 18, 2022 at 1:59
  • 1
    $\begingroup$ I guess I am bit inexperienced to convey properly, histogram is the observed size distribution of particles. I would like to model the observed data as noise from the instrument (Exponential distribution as noise is most likely to be small specs and static etc.) + log normal distribution of particles . After thinking over it more I got one problem in my approach that I need the function to model the data with input noise source. I am trying to model the data as sum of random distributions. I am just little confused as how to proceed next $\endgroup$
    – ipcamit
    Commented Jan 18, 2022 at 4:19
  • 2
    $\begingroup$ Use software that automatically determines mixture model contributions to a density function, for example, FindDistribution in the Mathematica language. Then refine your answer, e.g., FindDistributionParameters. Then think about the results, and take further action as needed. $\endgroup$
    – Carl
    Commented Jan 18, 2022 at 10:15
  • $\begingroup$ Shot noise follows a Poisson distribution whose mean is conditional on the true underlying value. That leads directly to a simple way of simulating such data. In R, for instance, you could generate lognormal + shot noise data in a single line like (function(n, mu=0, sigma=1) rpois(n, exp(rnorm(n, mu, sigma))))(10, 4.0, 2.5) Is this what you are looking for? $\endgroup$
    – whuber
    Commented Jan 18, 2022 at 15:59
  • $\begingroup$ @Carl your suggestion was quite useful and it worked for me. can you please suggest some reading for the algorithm behind it? I would like to replicate it in python. whuber thank you for your comment I havent gotten around it yet, will try and update. $\endgroup$
    – ipcamit
    Commented Jan 19, 2022 at 0:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.