Free Essay

# Random Number Exponential Distribution

In: Science

Submitted By jhamona
Words 373
Pages 2
Frequencytest.m

r = rand(1000,1); x = zeros(20,1); for i=1:1000 for j=0:19 if(r(i)>=j*0.05 && r(i)<(j+1)*0.05) x(j+1)=x(j+1)+1; end end end a=0; for k = 1:20 a = a + (x(k)-50)*(x(k)-50)/50; end a

Pokers_test.m r = randi([0,999],1000,1); a=0; b=0; c=0; for i = 1:1000 if r(i)==0 b=b+1; elseif (r(i)>0)&&(r(i)<=10) c=c+1; elseif (r(i)>10)&&(r(i)<100) x=mod(r(i),10); y=(r(i)-x)/10; if (x==y || x==0) c=c+1; else a=a+1; end else x=mod(r(i),10); y=mod(((r(i)-x)/10),10); z=(((r(i)-x)/10)-y)/10; if (x==y)&&(y==z) b=b+1; elseif (x~=y)&&(x~=z) a=a+1; else c=c+1; end end end a b c chisq = (a-720)*(a-720)/720 + (b-10)*(b-10)/10 + (c-270)*(c-270)/270

normal.m

r=rand(200,1); r=sort(r); x=zeros(100,1); a=zeros(100,2); for n=1:100 i=2*n-1 x(n,1)= sqrt(-2*log(r(i,1)))*cos(2*pi*r(i+1,1)); a(n,2)=x(n,1); a(n,1)=exp(-x(n,1)*x(n,1))/(2*pi); end plot(a(:,1),a(:,2))

Exp_dist.m

r=rand(100,1); r=sort(r); x=zeros(100,1); a=zeros(100,2); for n=1:100 x(n,1)=-log(1-r(n,1)); a(n,2)=x(n,1); a(n,1)=exp(-x(n,1)); end plot(a(:,1),a(:,2))

r = rand(1000,1); x = zeros(20,1); for i=1:1000 for j=0:19 if(r(i)>=j*0.05 && r(i)<(j+1)*0.05) x(j+1)=x(j+1)+1; end end end a=0; for k = 1:20 a = a + (x(k)-50)*(x(k)-50)/50; end a

### Similar Documents

Free Essay

#### Binomial Distribution

...Binomial Distribution This is a discrete random variable, where the process of obtaining the Binomial distribution is called “Bernoulli “ process. An experiment that often consists of repeated trials, each with two possible outcomes, which could be labeled as “success” or “failure”. This experiment is known as binomial experiment. A binomial experiment is one that possesses the following properties: 1. The experiment consists of n repeated trials. 2. Each trial has only 2 possible outcomes that can be classified as “Success” or “Failure”. 3. The probability of a success and failure , denoted by pand q, remains constant from trial to trial. 4. The repeated, trials are independent. Formula for success in the Bernoulli process. The probability of r success from n trial is : [pic] where; r - the number of success n – the number of trial p – the probability of success from one trial and q – the probability of failure from one trial. q = 1 - p [pic] with mean, [pic] and variance, [pic] It is written as X ~ B(n,p) and read as X is Binomial distribution with parameters n success and the probability of success, p. Example 7.4 One coin is tossed 5 times. If X is random variable for number of heads . Find the probability of getting (a) no heads (b) one head (c) 3 heads (d) at least 3 heads Solution X......

Words: 986 - Pages: 4

Free Essay

#### Random

...embedded in our core values. Our corporate vision describes what we aim to do, our values of AIR “Alive, Inclusive and Respectful” describe how we intend to get there. 03 global presence Number of Circles (India) 1 5 15 22 Alive We are alive to the needs of our customers. We act with passion, energy and a ‘can do’ attitude to help our customers realise their dreams. Innovation and an entrepreneurial spirit drive us - if it can’t be done, we will find a way. 1996 2001 2003 2004 20 countries Inclusive Airtel is for everyone – we champion diversity, recognising the breadth and depth of the communities we service. We work with them, anticipating, adapting and delivering solutions that enrich their lives. We do this by having an open mind and embracing change. 2012 Key Figures (as on 31 416,038 Operating Revenue (Mn INR) st March, 2012) 57,300 Net Profit (Mn INR) 181,300 Number of Subscribers (000’s) 5118 Network Coverage, Number of Census Towns Respectful We live the same lives as customers, sharing the same joys and the same pains. We never forget that they are why we exist. We act with due humility, always open and honest, to achieve mutual respect. 454,302 Network Coverage, Number of Villages 150,000 Number of Outlets 13124 Number of Employees (full time) 04 our services In the year 2011-'12, Airtel restructured the organisation creating two distinct Customer Business Units • B2C (Business to Customer) • B2B......

Words: 18742 - Pages: 75

#### Random

...feasibility of an HR department is inquired. The methods used for data collection and research is entirely based on a survey which consists of a combination of questionnaires and interviews which have enabled us to collect primary data for this study as no secondary data can be found due to the absence of the HR department in the university. Multi-stage sampling was carried out where sampling is conducted by using 2 techniques. Here they used random sampling and systematic sampling. Faculty members and employees from the administrative staff were selected as sample. Although selection was random but was based on certain set of rules i.e. systematic sampling. Faculty members were selected from all departments but on the basis of specific seniority where faculty members defined as assistant professors and senior lecturers with at least 1 year experience. In case of administrative staff their seniority and experience in the campus was highly considered when drawing a sample. The sample size for research consisted of 30% of the total number of faculty members, therefore 25 faculty members and about 5 staff members from the administration department. Q2. Why did the author select these methods for his research paper? Ans2. We will describe the entire method from scratch so that a good comprehension of the methods can be achieved along with the understanding of why these specific method s were used. The author implemented and undertook a descriptive research method. The......

Words: 3905 - Pages: 16

Free Essay

#### Random

...it’s a problem, but they don’t seem to ever want to take any steps to change how they do things, so it’s not really a surprise when next year’s release is late, too. And so, here it is, coming up on autumn again, and I find myself thinking about trying to develop some retail software of my own. I’ve got a couple ideas that I think are pretty good and that I think I could probably complete, but I don’t have the knowledge of how to market and distribute the software in order to make a decent profit on it. Or maybe I do–I haven’t tried it, so I guess I can’t say for sure, but I think I’m missing enough pieces that I’d stand a high chance of failure. But maybe I’ve got it wrong. I hear that this internet thing makes software distribution easier. I do know a number of other folks who are managing to make a living selling retail software, and I bet at least one of them would be willing to help out. Maybe this is the year where I try something different so I can maybe break the cycle of insanity I find myself in about this time every year. Who knows, maybe I’ll even be able to prove to myself that the software business doesn’t have to be as messed up as it seems to be. But first I’ve got to finish what I’m working on and get past summer....

Words: 667 - Pages: 3

#### Annotated Sampling and Distribution

...Distributions, Sampling and Estimation Our main objective in this section is to learn how to estimate some important characteristics of random variables using data. We will concentrate on estimating the mean from a normal distribution, and the proportion of success in a binomial distribution. To talk about estimation, we first need to know something about distributions and sampling. Most data used for decision making exhibit variation. We are interested in drawing conclusions from such data. Probability and statistics give us the necessary tools. We will again make use of the concept of a random variable. We have reviewed discrete random variables already. Before moving on, we need to review continuous random variables. Continuous random variables take on continuous or interval values (there are an infinite number of possibilities). If you are measuring, the distribution of the result will almost always be continuous. For example, the width of an extruded bar is a continuous random variable. The distribution of a continuous random variable is represented by a continuous curve (called the probability density function (pdf) and often denoted f(y)). The height of the curve does not represent probabilities; instead, the area under the curve between two points tells us about the probability. As a result, the probability that a continuous random variable is exactly equal to a single value is 0 (there is no area under a......

Words: 2939 - Pages: 12

Free Essay

#### Random

...Introduction to Randomness and Random Numbers. Randomness and random numbers have traditionally been used for a variety of purposes, for example games such as dice games. With the advent of computers, people recognized the need for a means for a means of introducing randomness into a computer program. Surprising as it may seem, however, it is difficult to get a computer to do something by chance. A computer running a program follows its instructions blindly and is therefore completely predictable. Computer engineers chose to introduce randomness into computers in the form of pseudo-random number generators. As the name suggest, pseudo-numbers are not truly random. Rather, they are computed from a mathematical formula or simply taken from a pre-calculated list. A lot of research has gone into pseudo-random number theory and modern algorithms for random numbers have the characteristic that they are predictable, meaning they can be predicted if you know where in the sequence the first number is taken from. For some purposes, predictability, is a good characteristic, for others it is not., Random numbers are used for computer games but they are also used on a more serious scale for the generation of cryptographic keys are for some classes of scientific experiments. For scientific experiments, it is convenient that a series of random numbers can be replayed for use in several experiments, and pseudo-random numbers are well suited for this purpose. For cryptographic use,......

Words: 262 - Pages: 2

Free Essay

#### Random

Words: 1924 - Pages: 8

#### Random

...be answered with a marketing research program. ans 4a Depth Interview: One-on-one interviews that probe and elicit detailed answers to questions, often using nondirective techniques to uncover hidden motivations. Advantages 1.)No group pressure 2.) Respondent is focus of attention and feels important 3.) Respondent is highly aware and active 4.) Long time period encourages revealing new information 5.) Can probe to reveal feelings and motivations 6.) Discussion is flexible and can explore tangential issues Disadvantages 1) Much more expensive than focus groups 2.) Do not get the same degree of client involvement; clients do not want to observe single interviews 3.) Are physically exhausting for the moderator…reduces the number of people that can be interviewed in a given time period. 4.) Moderators do not have other group members to help obtain reactions and to stimulate discussion. ans 4b The greatest advantage of observational menthods is that they permit measurement of actual behavior rather than reports of intended or preffered behavior. There is no reporting bias and potential bias which could be caused by the interviewer. In marketing research, the most frequently used types of observational techniques are: Personal observation: observing products in use to detect usage patterns and problems observing license plates in store parking lots determining the socio-economic status of shoppers determining the level of package......

Words: 3465 - Pages: 14

Free Essay

#### Exponential & Logarithmic Function

...can be expressed in terms of addition, subtraction, multiplication, division, and the taking of roots of variables and constants are called algebraic functions. In exponential & logarithmic functions we introduce and investigate the properties of exponential functions and Logarithmic functions. These functions are not algebraic; they belong to the class of transcendental functions. Exponential and logarithmic functions are used to model a variety of realworld phenomena: growth of populations of people, animals, and bacteria; radioactive decay; epidemics; absorption of light as it passes through air, water, or glass; magnitudes of sounds and earthquakes. We consider applications in these areas plus many more in the sections very important. As a part of our BBA course, we are required to submit a term paper for every subject each semester. As our Advance Business Mathematics faculty Associate Professor Lt. Col. Md. Showkat Ali has asked us to submit a term paper on a topic upon our will. So, we have decided to choose “Exponential & Logarithmic Functions”.                        to graph exponential functions to evaluate functions with base e to learn the use of compound interest formulas to learn the changing from logarithmic to exponential form to learn the changing from exponential to logarithmic form to learn the evaluation of logarithms to learn the use of basic logarithmic properties to learn the use of graph logarithmic functions to......

Words: 1967 - Pages: 8

Free Essay

#### Random Numbers

...Random numbers in C++ and The Pythagorean Theorem Name Course Date Random numbers in C++ and The Pythagorean Theorem Introduction Computer programs in light of the technological advances that have been made, arguably make up for the most important concepts in such developments. A set of instructions designed to assist a computer to prefer a given task is referred to as a computer program. There are numerous languages used to create/design computer for instance Java Script, Java, C++, SQL and Sage (Laine, 2013). Computer programming is defined as a process of developing a working set of computer instructions meant to aid the computer in the performance of a given task. Computer programming starts with the formulation of a valid computer problem. This process is then followed by the development of an executable computer program, for instance Firefox Web Brower (Laine 2013). It is worth noting that there are other programs in the same realm. Computer programming is a diverse field that is of utmost importance in the modern world, especially with the continuous expansion of the internet. Perhaps the relevance of this can be underlined by the fact that computer programming has carved out as a course on itself. Computer programming is offered under several courses studied in colleges and universities (Laine, 2013). Computer programming is not only for computer students but for all who use computers on a day to day basis. This is by extension everyone since the...

Words: 9330 - Pages: 38

Free Essay

#### Random Numbers in C++

...Random numbers in C++ and The Pythagorean Theorem Literature Review Name Course Date Literature Review The increase in technological advancements has seen a similar increase in the number of computer programs which are designed to command a computer to carry out a given specified task. The number of languages that are available which are used in this creation and design include Java Script, C++, Java and Sage. It is worth noting that while these are the most notable ones, the number of languages in computer programming design might be higher. However, computer programmers argue that the rest of the languages, despite being of equal capabilities, have not met the required usage to warrant widespread literature review. Hiscotta is particularly critical of this in 10 programming languages you should learn in 2014 by asserting that The field of computer programming is particularly important with regards to the increasing use and adoption of the internet use. This has seen the field carve out a distinct field of study which is purely dedicated to the understanding of how the programs work. The first step in the design of the computer programs is the basic understanding of the dynamics that are involved in the working of computers. This forms the initial step which will eventually be accompanied by software writing involving random numbers with the sole undertaking of coming up with a particular outcome. Of critical importance is the adherence to source code......

Words: 1434 - Pages: 6

#### Random

...Highlights 37 Maxis Management Team 44 Our Network Transformation 8 What’s Important To Us 46 Our People 12 Chairman’s Statement 48 Our Corporate Responsibility 15 CEO’s Statement 20 Group Quarterly Financial Performance 21 Summarised Group Statement of Financial Position 22 Investor Relations 25 Corporate Information Corporate Governance Financial Statements Other Information 50 Corporate Governance 76 Directors’ Report 193 Size of Shareholdings 65 Audit Committee Report 83 Statements of Profit or Loss 69 Statement on Risk Management and 84 Statements of Comprehensive Internal Control Income 193 Distribution Table According to Category of Shareholders 75 Directors’ Responsibility Statement 194 Directors’ Interest in Shares 85 Statements of Financial Position 195 30 Largest Shareholders 87 Statements of Changes in Equity 91 Statements of Cash Flows 197 Information on Substantial Shareholders 94 Notes to the Financial Statements 189 Supplementary Information 190 Statement by Directors 190 Statutory Declaration 199 List of Properties Held 201 Disclosure of Recurrent Related Party Transactions 203 Additional Disclosures 204 Material Contracts 191 Independent Auditors’ Report to the 211 Glossary Members of Maxis Berhad 212 Notice of Annual General......

Words: 6485 - Pages: 26

Free Essay

#### Exponential Functions

...4-1 Exponential Functions 1. What is the definition of an exponential function? Page 412 An exponential function f with base b is defined by f(x) = bx or y = bx, where b is a positive constant other than 1 (b > 0 and b is not equal to 1) and x is any real number. Example: g(x) = 10^x 2. What is the inverse of an exponential function? Page No horizontal line can be drawn that intersects the graph of an exponential function at more than one point. This means that the exponential function is one-to-one and has an inverse. Example: fx = b(x) Steps for solving problem: Replace: fx with y: y = b(x) Interchange x and y: x=b(y) Solve for y 3. What are the characteristics of an exponential function? Page 415 * The domain of f(x) = b^x consists of all real numbers. The range of F(x) = b^x consists of all positive real numbers (0, to infinity). * The graphs of all exponential functions of the form f(x) = b^x pass Through the point (0, 1) because f(0) = b^0 =1 (b not equal to 0) the y intercept is 1. There is no x intercept. * If b > 1, f(x) – b^x has a graph that goes up to the right and is an increasing function. The greater the value of b, the steeper the increase. * If 0 < b < 1, f (x) = b^x has a graph that goes down to the right and is a decreasing function. The smaller the value of b, the steeper the decrease. * F(x) = b^x is......

Words: 315 - Pages: 2