Binomial sequence and graph display

In summary: I don't understand how to generate a bunch of data and empirically produce the binomial distribution.
  • #1
physics.alex
28
0

Homework Statement


Given a series of 0 and 1 , how can we plot the binomial curve ??
Example: 00000011100010010100011110

say,p=0.8 q=0.2, N=26


Homework Equations



If I apply the classic binomial formula, 26C0 (0.8)^0(0.2)^(26-0) etc.. seems cannot do so.
 
Physics news on Phys.org
  • #2
It's not really clear what you're trying to do. Could you provide more details?
 
  • #3
sorry my question is unclear
objective: plot a binomial distribution curve by giving a sequence of '0' and '1'

Example: 00000011100010010100011110

say,p=0.8 q=0.2, N=26
 
  • #4
What are the 0s and 1s supposed to represent? The result of 26 trials with p=0.8? You can't get a binomial distribution curve from just that.
 
  • #5
like coins flipping
0=H
1=T
p(H)=0.8
p(T)=0.2
 
  • #6
Can you provide the complete text of the problem? You seem to be leaving out info that might make your question make sense.

Right now, you're asking something like: given that you rolled a pair of dice and they came up 2 and 4, how can we plot the probability distribution of all the possible outcomes?
 
  • #7
Given a biasd coin and flip 26 times.
Example: HHHTTTHHHTTTTHHT p(H)=0.8
How to interpret the sequence using Binomial distribution? and How is the graph looks like?
 
  • #8
What's the probability of getting n heads and m tails in (n+m) trials?
 
  • #9
sorry the question is already posted.
We can make our assumption as long as it is a biased coin.

Example: total 26 trials (n+m) and prob. of getting head is 0.8
does it make sense??
The main objective is to show that in biased case, the plotted curve is easily be distinguished by just observing the graph
 
  • #10
So are you just asking how to plot the binomial distribution when it's hard to calculate because the numbers are big or small? You don't have an actual sequence of 1s and 0s, right?
 
  • #11
hm..yes we don't have the actual sequence according to the question.

what is wrong with the question?? The main objective is to plot the graph and see these 2 results (i.e.H or T) has a easy distinguished pattern. If it is the unbiased coin, i.e. p(h)=0.5, the pattern is not easy to distinguish.
 
  • #12
There's nothing wrong with the question; it's the way you asked it. It sounded like you were provided with a random sequence of 26 1s and 0s and wanted to somehow extract the binomial distribution from it.

Usually, when the numbers get too unwieldy to calculate the binomial distribution directly, you can approximate it by a normal distribution with the same mean and variance.
 
  • #13
Or do you want to generate a bunch of data and try to empirically produce the binomial distribution? If that's the case, just generate a bunch of sets of N ones and zeros randomly, and for each set, count the number of times one appears. Make a histogram of the results, and it should approach a binomial distribution.
 
  • #14
Ok if I take your approach, randomly generate 1 and 0, and would like to plot the histogram, what is the x-axis? y-axis should be the probability,right?
I use Matlab and run the following

clear;
x1=1:102;
y1 = binopdf(x1,102,0.2);

x2=1:102;
y2 = binopdf(x2,102,0.8);

plot(x1,y1,'+',x2,y2,'ro');

xlabel('symbols');
ylabel('probability');
title('Biased prob. of symbol H and symbol T');
legend('symbol H','symbol T');

I got the graph with two distribution with same height (i.e. same probability) and sounds doesn't make sense to me. (see attachment)
 

Attachments

  • HT.jpg
    HT.jpg
    12 KB · Views: 340
  • #15
Your code doesn't generate any random numbers. The function binopdf is the binomial probability density function.

You calculated the probability of x heads and, separately, the probability of y tails both out of n trials. Do you see why the probability of x heads is equal to the probability of n-y tails? If you understand that, it should make sense why you got the two curves you did.
 
  • #16
Because the only difference of these 2 curves is the p which can controls the curve position.
So you mean we cannot do so,right? How can I obtain 2 curves that easily to distinguish the H and T clusters??
 
  • #17
It seems I still have no idea what you're trying to do.
 
  • #18
ok .. if use histogram, we will have only 2 bars, one is shorter than another,right?
 
  • #19
No. What exactly are you trying to do?
 
  • #20
I am thinking what the graph looks like from your reply

"Or do you want to generate a bunch of data and try to empirically produce the binomial distribution? If that's the case, just generate a bunch of sets of N ones and zeros randomly, and for each set, count the number of times one appears. Make a histogram of the results, and it should approach a binomial distribution. "

I am trying to plot the graph that you suggested
 

FAQ: Binomial sequence and graph display

What is a binomial sequence?

A binomial sequence is a type of mathematical sequence in which each term is obtained by adding the two previous terms. It is represented by the formula an = an-1 + an-2 and is commonly used in statistical analysis and probability calculations.

How is a binomial sequence different from other types of sequences?

Unlike other mathematical sequences, a binomial sequence has two starting values (a0 and a1) and each subsequent term is determined by adding the two previous terms. Other sequences may have different starting values and follow different patterns for determining each term.

How can a binomial sequence be graphically displayed?

A binomial sequence can be graphically displayed using a line graph, with the x-axis representing the terms of the sequence and the y-axis representing the values of each term. The resulting line will show the trend and growth of the sequence over time.

What is the significance of a binomial sequence in statistics?

Binomial sequences are important in statistics because they can be used to model and analyze real-world situations, such as coin flips or genetics. They are also used in calculating probabilities and making predictions based on past data.

How can a binomial sequence be used to make predictions?

By analyzing the trend of a binomial sequence and its rate of growth, it is possible to make predictions about future values and outcomes. This can be useful in various fields such as finance, biology, and economics.

Similar threads

Back
Top