How do I use a histogram to find a combined fit for my muon lifetime experiment?

Click For Summary

Discussion Overview

The discussion revolves around the use of histograms in analyzing data from a muon lifetime experiment. Participants explore how to create a histogram from experimental data and how to perform a combined fit of the data using both exponential and linear components.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Hannah expresses confusion about how to use a histogram for her muon lifetime data and questions its conceptual purpose.
  • Patrick explains that a histogram is created by counting the number of occurrences of measured values within defined bins, which represents a probability distribution of muon lifetimes.
  • Hannah realizes that she has already created a histogram in Excel but questions its validity and seeks guidance on how to find a combined fit from it.
  • Patrick suggests that a combined fit can be achieved by writing a cost function based on least squares, involving parameters for both the exponential and linear components.
  • There is a suggestion that MATLAB may be more suitable for fitting than Excel, with a critical view of Excel's capabilities in scientific contexts.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best tool for fitting the data, with differing opinions on the suitability of Excel versus MATLAB. The discussion remains unresolved regarding the specific methods for achieving the combined fit.

Contextual Notes

There are limitations in the understanding of how to properly utilize histograms for fitting, as well as uncertainty about the appropriateness of different software tools for the analysis.

Emc2brain
Messages
22
Reaction score
0
Need HELP! Muon Lifetime Experiment

I just recently collected data from a muon lifetime determination experiment. The data was presented in the form of two columns: x = time (microseconds) and y = counts/bin. After plotting this xy into a graph I found that my muon lifetime was 2.12 (close enough).

I was supposed to find a "combined fit" for the xy graph to:

N= Noe^(-t/tau) + C

Where tau is the mean lifetime. But! Haha! I simply took it upon myself to use excel trendline to determine the two separate components of fitting it. In the Excel attachment you will see what I mean by fitting the graph (by the two red dashed lines) One red line indicates the exponential component and the other red line indicates the constant (linear) background component.

What is key here is that I'm supposed to use a HISTOGRAM! Well, I am ashamed to say that I don't particularly know how to use a histogram as well as I wish. Besides that, I don't even understand conceptually what a histogram does with my data (which is also provided). How do I use a histogram to fit it to the above?

THANX
Hannah :cry:
 

Attachments

Last edited:
Physics news on Phys.org
Emc2brain said:
What is key here is that I'm supposed to use a HISTOGRAM! Well, I am ashamed to say that I don't particularly know how to use a histogram as well as I wish. Besides that, I don't even understand conceptually what a histogram does with my data (which is also provided). How do I use a histogram to fit it to the above?

But you already have a histogram, if I understand your message well.
Let me explain a bit: to make a histogram, you have to repeat the same experiment many times, and the outcome of each experiment must give you a number, say: the lifetime of a muon.
So you have a long list of muon lifetimes: if you measured 5000 muons, you measured 5000 lifetimes. These are the data you start with.
To make a histogram, you choose a real axis which represents the quantity you've been measuring (here the muon lifetime), and you define a number of equal-sized bins on that axis that will be relevant. So you define the bin:
0-0.1 microsecond, the bin 0.1-0.2 microsecond etc... for example.
Next, you process your data: you will count in each bin how many times the measurement result was within the limits of the bin.
These numbers of counts, as a function of the bin center, is what's called a histogram. But that's the data you already have !
The reason for doing this "histogramming" is that it is the experimentalist's way of measuring a probability distribution.

cheers,
Patrick.
 
Lost! Muon

Okay thanx, that makes a bit of sense because I was able to actually solve for the mean lifetime without using a generated histogram (that which I proceeded to make in excel! which I guess now makes no sense, right? it would be essentially a histogram of a histogram, how peculiar).

Alright, but do you know how I would find a combined fit from this output histogram? Should MATLAB be used here or is excel okay? This combined fit is a mixture of both exponential and linear, so excel's "trendline" isn't really sufficient (which is why I used trendline for the two different portions of my histogram output). If you know anything on this matter.

Hannah :wink:
 

Attachments

Emc2brain said:
Alright, but do you know how I would find a combined fit from this output histogram? Should MATLAB be used here or is excel okay?

Excel is for used car salesmen and economists, not for scientific work
Probably the best way (also from a pedagogical point of view) to solve the fit problem is to write out the cost function (take least squares):

f(a,b,c) = Sum_i ( m(x_i ; a,b,c) - n(x_i) )^2

In the above, a,b and c are your parameters ( a exp(- b x) + c) or something ;
x_i represents the center values of the bins (the center lifetimes) and n(x_i) represents the number of counts for that bin with center x_i.

m(x_i ; a,b,c) is your model function evaluated at the bin center.

m(x ; a,b,c) = a exp(- b x) + c)

You sum over all the bins you have in your data and that gives you the cost function f(a,b,c) as a function of the values for the parameters.
The best fit is then given by the minimum of that function ; this can be done numerically, by solving:

df/da = 0 ; df/db = 0 ; df/dc = 0

cheers,
patrick.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 0 ·
Replies
0
Views
5K
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 18 ·
Replies
18
Views
11K