The document describes four experiments related to generating random numbers using the linear congruential method. It shows the generation of random numbers based on different conditions for the increment, modulus, and seed values. It also calculates the period and applies the Kolmogorov-Smirnov test to test the uniformity of the generated random numbers.
1) The document describes how to use a single-period and two-period binomial option pricing model to value European call and put options.
2) It provides a step-by-step example of using a single-period model to value a European call and put. The steps include creating an asset price lattice, determining terminal option values, calculating probabilities, and determining the option and hedge ratios.
3) It then demonstrates a two-period binomial model example to value a European put option, extending the process over two periods rather than one.
4) Finally, it notes that an American option would be valued differently than a European option using binomial modeling, as the early exercise feature has additional value.
The document describes the Liang-Barsky line clipping algorithm. It begins by defining a line parametrically and initializing the line clipping parameters. It then describes how to check each edge of the clipping region and update the clipping parameters if needed. An example is provided that clips a line against a rectangle, updating the start and end points of the line based on the clipping calculations. Pseudocode and an OpenGL program implementation of the algorithm are also included.
The document defines properties of arithmetic mean and provides examples to illustrate these properties. The key properties are: 1) The sum of deviations from the mean is zero. 2) The sum of squares of deviations from the mean is minimum. 3) The mean is unaffected by a constant change of scale or origin. 4) The mean of multiple data sets can be calculated as a weighted average based on sample sizes. The examples demonstrate calculating means and verifying properties for various data sets.
The document describes a car wheel rotating at 20 revolutions per minute with a radius of 26cm. It asks several questions about the motion of point X on the wheel:
1) Sketch a graph of point X over two revolutions.
2) Write a sine and cosine equation to model point X's motion.
3) Determine when point X is 20cm above the pavement.
4) Determine the length of one full revolution of the car wheel.
5) Determine how many revolutions are needed to travel 1km. The document provides the necessary information and steps to solve each part using trigonometric functions and equations.
The document provides information about calculating the arithmetic mean. It defines the arithmetic mean as the sum of all values divided by the total number of items. It discusses simple arithmetic mean for individual observations, discrete series, and continuous series. Formulas and examples are provided for calculating the arithmetic mean using direct methods and a shortcut method. The shortcut method uses deviations from an assumed mean. The document also introduces the step deviation method, which divides deviations by a common factor to reduce numbers.
QRB 501 Final Exam Answers
QRB 501 Final Exam
1) Write the following as an algebraic expression using x as the variable:
Triple a number subtracted from the number
A. 3(x - x)
B. x 3 – x
C. 3x - x
D. x - 3x
2) Write the following as an algebraic expression using x as the variable: A
number decreased by 25 and multiplied by 4
A. x – 25 · 4
B. -25x · 4
C. 4x - 25
D. 4(x – 25)
3. Write the following as an algebraic expression using x as the variable: The
sum of a number and -8
A. -8 + x
B. -8 - x
C. x (-8)
D. -8x
4) Write the following as an algebraic expression using x as the variable:
Twelve less than six times a number
A. 12 – 6x
B. –6x
C. –12(6x)
D. 6x – 12
5) Solve: -3 – (-2 + 4) - 5
A. 15
B. 10
C. -6
D. -10
6) Solve: (–5)2 · (9 – 17)2 ÷ (–10)2
A. 16
B. 64
C. -6.4
D. -.039
7) Solve: 3(32) – 8(9 – 2) ÷ 2
A. -14.5
B. 55
C. 66.5
D. -1
8) Solve: (–5)2 · (9 – 17)2 ÷ (–10)2
A. 16
B. 64
C. -6.4
Monte Carlo methods rely on repeated random sampling to compute results. They generate random samples from a population according to a probability distribution and use them to obtain numerical results. The founders of the Monte Carlo method were J. von Neumann and S. Ulam during the Manhattan Project in the 1940s. Monte Carlo methods can be used to solve multidimensional integrals and have better convergence than classical numerical integration methods for dimensions greater than 4. The variance of Monte Carlo estimates decreases as 1/N, where N is the number of samples, resulting in slow convergence. Variance reduction techniques can improve the convergence rate.
The document contains practice problems related to linear equations, including simplifying expressions, finding greatest common factors, determining functions from tables, writing equations in point-slope and standard form, calculating slope, determining the equation of a line given a point and slope, and graphing lines on a coordinate plane. Solutions or steps are provided for some of the problems to demonstrate the process for solving different types of linear equation questions.
1) The document describes how to use a single-period and two-period binomial option pricing model to value European call and put options.
2) It provides a step-by-step example of using a single-period model to value a European call and put. The steps include creating an asset price lattice, determining terminal option values, calculating probabilities, and determining the option and hedge ratios.
3) It then demonstrates a two-period binomial model example to value a European put option, extending the process over two periods rather than one.
4) Finally, it notes that an American option would be valued differently than a European option using binomial modeling, as the early exercise feature has additional value.
The document describes the Liang-Barsky line clipping algorithm. It begins by defining a line parametrically and initializing the line clipping parameters. It then describes how to check each edge of the clipping region and update the clipping parameters if needed. An example is provided that clips a line against a rectangle, updating the start and end points of the line based on the clipping calculations. Pseudocode and an OpenGL program implementation of the algorithm are also included.
The document defines properties of arithmetic mean and provides examples to illustrate these properties. The key properties are: 1) The sum of deviations from the mean is zero. 2) The sum of squares of deviations from the mean is minimum. 3) The mean is unaffected by a constant change of scale or origin. 4) The mean of multiple data sets can be calculated as a weighted average based on sample sizes. The examples demonstrate calculating means and verifying properties for various data sets.
The document describes a car wheel rotating at 20 revolutions per minute with a radius of 26cm. It asks several questions about the motion of point X on the wheel:
1) Sketch a graph of point X over two revolutions.
2) Write a sine and cosine equation to model point X's motion.
3) Determine when point X is 20cm above the pavement.
4) Determine the length of one full revolution of the car wheel.
5) Determine how many revolutions are needed to travel 1km. The document provides the necessary information and steps to solve each part using trigonometric functions and equations.
The document provides information about calculating the arithmetic mean. It defines the arithmetic mean as the sum of all values divided by the total number of items. It discusses simple arithmetic mean for individual observations, discrete series, and continuous series. Formulas and examples are provided for calculating the arithmetic mean using direct methods and a shortcut method. The shortcut method uses deviations from an assumed mean. The document also introduces the step deviation method, which divides deviations by a common factor to reduce numbers.
QRB 501 Final Exam Answers
QRB 501 Final Exam
1) Write the following as an algebraic expression using x as the variable:
Triple a number subtracted from the number
A. 3(x - x)
B. x 3 – x
C. 3x - x
D. x - 3x
2) Write the following as an algebraic expression using x as the variable: A
number decreased by 25 and multiplied by 4
A. x – 25 · 4
B. -25x · 4
C. 4x - 25
D. 4(x – 25)
3. Write the following as an algebraic expression using x as the variable: The
sum of a number and -8
A. -8 + x
B. -8 - x
C. x (-8)
D. -8x
4) Write the following as an algebraic expression using x as the variable:
Twelve less than six times a number
A. 12 – 6x
B. –6x
C. –12(6x)
D. 6x – 12
5) Solve: -3 – (-2 + 4) - 5
A. 15
B. 10
C. -6
D. -10
6) Solve: (–5)2 · (9 – 17)2 ÷ (–10)2
A. 16
B. 64
C. -6.4
D. -.039
7) Solve: 3(32) – 8(9 – 2) ÷ 2
A. -14.5
B. 55
C. 66.5
D. -1
8) Solve: (–5)2 · (9 – 17)2 ÷ (–10)2
A. 16
B. 64
C. -6.4
Monte Carlo methods rely on repeated random sampling to compute results. They generate random samples from a population according to a probability distribution and use them to obtain numerical results. The founders of the Monte Carlo method were J. von Neumann and S. Ulam during the Manhattan Project in the 1940s. Monte Carlo methods can be used to solve multidimensional integrals and have better convergence than classical numerical integration methods for dimensions greater than 4. The variance of Monte Carlo estimates decreases as 1/N, where N is the number of samples, resulting in slow convergence. Variance reduction techniques can improve the convergence rate.
The document contains practice problems related to linear equations, including simplifying expressions, finding greatest common factors, determining functions from tables, writing equations in point-slope and standard form, calculating slope, determining the equation of a line given a point and slope, and graphing lines on a coordinate plane. Solutions or steps are provided for some of the problems to demonstrate the process for solving different types of linear equation questions.
The document discusses normal distributions and provides the following key points:
1. A normal distribution is a continuous probability distribution that has a bell-shaped curve and is described by its mean and standard deviation.
2. The probability of a random variable being equal to any exact value is zero for a continuous distribution, but the probability of it lying within a range of values is not zero.
3. The normal distribution is commonly used because it can be fully described using its mean and standard deviation, and tables of the standard normal distribution N(0,1) allow probabilities and values to be easily looked up.
1) The document contains 13 multiple choice questions about measures of dispersion including range, coefficient of dispersion, quartile deviation, coefficient of variation, variance, standard deviation, and skewness.
2) It asks to calculate various statistical measures from given data sets, identify which year data was more consistent between two data sets, and identify properties of symmetrical, negatively skewed, and positively skewed distributions.
3) The answers to each of the 13 multiple choice questions are provided at the end.
The document discusses different measures of central tendency including arithmetic mean. It provides formulas and examples for calculating arithmetic mean using direct, discrete and continuous series. It also discusses methods like step deviation and shot-cut for calculating mean and provides examples. It further discusses concepts like finding correct mean when initial mean is incorrect, calculating combined mean of two series and finding missing frequency from the data where mean is given.
The document provides a warm-up section with 4 math problems and a test review section with additional math problems and graphs. It summarizes as follows:
1) The warm-up section contains 4 math problems involving simplifying expressions, sharing money in a ratio, adding fractions, and determining probabilities.
2) The test review section provides additional problems on graphing lines, interpreting slope and y-intercepts, comparing options with different costs structures, and using point-slope form to solve a problem about a roller coaster ride.
3) Graphs are presented showing pricing options and the path of a roller coaster to illustrate the concepts of slope and y-intercept.
This document provides an overview of random variables and probability distributions. It defines discrete and continuous random variables and gives examples of each. Discrete random variables have probabilities associated with each possible value, while continuous random variables are defined by probability density functions where the area under the curve equals the probability. The document discusses how to calculate the mean, variance and standard deviation of discrete random variables from their probability distributions. It also covers how the mean and variance are affected for linear transformations of random variables.
This document provides instructions for students to complete algebra warm up problems involving graphing lines from equations. It outlines three methods for graphing lines: using the slope and y-intercept, using a T-chart, and manipulating equations into slope-intercept form. Students are informed they will be tested on using both the slope-intercept method and the T-chart method for graphing lines from equations. They are also told they will need to learn how to manipulate equations in standard form and point-slope form into slope-intercept form.
The document contains an agenda for a statistics class that includes topics such as the normal distribution, z-scores, and using a z-table to find probabilities. The agenda covers defining population and sample means and standard deviations, analyzing exam score data, continuous probability distributions, the properties of the normal distribution, and how to use a z-table to find probabilities for various z-scores and ranges of z-scores. Examples are provided to demonstrate how to find probabilities and areas under the normal curve. Homework problems are assigned from the textbook.
Proportions are equations where two ratios are equal, and can be written using colon notation like a:b::c:d or as equivalent fractions a/b = c/d. In a proportion, the product of the means is equal to the product of the extremes. To solve proportions, use cross multiplication and then solve for the variable. Proportions can be used to compare parts to parts, parts to whole, or other relationships like length to width.
Measures of Dispersion: Standard Deviation and Co- efficient of Variation RekhaChoudhary24
This document discusses measures of dispersion, specifically standard deviation and coefficient of variation. It begins by defining standard deviation as a measure of how spread out numbers are from the mean. It then provides the formula for calculating standard deviation and discusses its properties. Several examples are shown to demonstrate calculating standard deviation for individual data series using both the direct and shortcut methods. The document also discusses calculating standard deviation for discrete and continuous data series. It concludes by defining variance and coefficient of variation, and providing an example to calculate coefficient of variation and determine which of two company's share prices is more stable.
11.4 slope intercept form of a linear equationGlenSchlee
This document discusses graphing and writing equations of lines in slope-intercept form. It covers identifying the slope and y-intercept from an equation in slope-intercept form, graphing a line by using its slope and a given point, writing an equation of a line given its slope and a point, and graphing horizontal and vertical lines. Examples are provided to illustrate finding slope and y-intercept, graphing lines by plotting points, writing equations, and graphing horizontal and vertical lines using a given point.
The document discusses two mathematical models for estimating the time spent driving to school based on starting time:
1) A difference equation model that represents the number of cars on different roads over time using a matrix equation.
2) A differential equation model that represents the rate of change in the number of cars on each road over time using another matrix equation.
Both models aim to relate the number of cars on the road to the time spent driving, with the goal of estimating driving time for different departure times from school.
The document discusses finding the maximum area of a shape given its perimeter. It shows setting up equations for the perimeter and area, isolating variables, and determining that the maximum area of 75 occurs when x=5 and y=10. The area equation is differentiated to verify that the point (5,75) represents a maximum, not a minimum.
The document provides information and instructions for analyzing student exam score data. It includes:
1) A table of 80 exam scores ranging from 53 to 97.
2) Instructions to calculate descriptive statistics like minimum, maximum, range, and percentiles of the scores.
3) Directions to construct a frequency distribution table and histogram of the scores binned into intervals of 5.
4) A calculation of measures of central tendency (mean, median, mode) and dispersion (variance, standard deviation) of the scores.
5) An analysis of the distribution's asymmetry and kurtosis.
This document discusses the normal distribution and sampling. It begins by explaining that the normal distribution can be used to approximate a continuous random variable to an ideal situation. It describes key aspects of the normal distribution including its bell curve shape, parameters of mean and standard deviation, and the fact that 50% of values are above and below the mean. The document then discusses the standard normal distribution with a mean of 0 and standard deviation of 1. It provides examples of calculating probabilities using the normal distribution and standard normal tables. It concludes with examples of solving probability problems involving the normal distribution.
The document discusses trigonometric functions of angles. It defines the six trigonometric functions (sine, cosine, tangent, cotangent, secant and cosecant) in terms of positions in the Cartesian plane. It also discusses how the values of the trigonometric functions change for angles in different quadrants, and how to find reference angles. Examples are provided to demonstrate evaluating trigonometric functions using reference angles and special angle identities.
This PowerPoint was created to help out graduating seniors who are taking the TAKS Mathematics Exit-Level test. It includes formulas, rules & things that they need to remember to pass the test.
Please Subscribe to this Channel for more solutions and lectures
http://www.youtube.com/onlineteaching
Chapter 10: Correlation and Regression
10.2: Regression
I am Anthony F. I am a Math Exam Helper at liveexamhelper.com. I hold a Masters' Degree in Maths, University of Cambridge, UK. I have been helping students with their exams for the past 9 years. You can hire me to take your exam in Math.
Visit liveexamhelper.com or email info@liveexamhelper.com.
You can also call on +1 678 648 4277 for any assistance with Math Exams.
CHAPTER TENObjectiveA brief introduction of the basic conceptTawnaDelatorrejs
CHAPTER TEN
Objective:
A brief introduction of the basic concepts of Forecasting Tools like Moving average, Weighted Moving Average, Exponential Smoothing will be used to develop projection models.
Chapter Content:
Forecasting techniques:
Into our class we will use a simple product to manufacturer. A plush eraser will be our product (Note: Don’t blame my drawing, only look at and enjoy it.).
The first technique will be Moving Average (MA). This forecasting technique consists in the estimate of a average value from historical data that move as the new present value it’s know. This average is determinated by a series of terms or established periods (n). The quantity of periods (n) will be based in the variation that it exists between the historical data. If there is large variation, the value (n) must be greater to reflect the variation. If there is small variation, the value (n) can be smaller.
Let us suppose that the following table shown the eraser’s demand for first six months of production.
Period (Month)
Demand
1
1250
2
1590
3
1340
4
1510
5
1486
6
1440
Using the Moving Average equation:
(
)
n
i
t
A
t
MA
å
-
=
)
(
Where: MA(t) is the forecasting for period t
A(t-i) is the present for period t-i
(n) is the number of periods to average
If we looking for the forecasting for the fifth period, using n=2 and n=3, which would be the answer?
N=2
N=3
A(4) = 1510
A(4) = 1510
A(3) = 1340
A(3) = 1340
---------------
A(2) = 1590
Σ = 2850
Σ = 4440
n = 2
n = 3
MA(5) = 1425
MA(5) = 1480
The average changes of period when calculating the next forecasting. When forecast the sixth period, the terms to be used for the average change according to the following example:
N=2
N=3
A(5) = 1486
A(5) = 1486
A(4) = 1510
A(4) = 1510
---------------
A(3) = 1340
Σ = 2996
Σ = 4336
n = 2
n = 3
MA(5) = 1498
MA(5) = 1445.3
The next technique known like Weighted Moving Average, this technique to difference of regular moving average, each period have a weight assigned as output probability. The Moving average to divide the periods sum between the value (n), indirectly,
it’s giving the same probability o weight to each period to determine the forecasting.
(
)
(
)
å
-
-
=
i
t
xW
i
t
A
t
WMA
)
(
Where t is the hoped period and i value run from 1 to n.
Example, determining the sixth forecasting, with (n) = 2
Mov. Average Reg
Weighted MA
A(5) = 1486 x (50%)
A(5) = 1486 x (75%)
A(4) = 1510 x (50%)
A(4) = 1510 x (25%)
MA(6) = 1498
WMA(6) = 1492
This technique allow to assign a weight or probability according to expect behavior from marketing influences. I.e. to assign greater weight to the period value most recent a cause of a promotion. The quantity of periods or term to be used for estimate the forecast depends of the variation that exists between the historical data. That means, follow the same concept of moving average.
The third technique is the Exponential Smoothing. This forecasting technique allows a ...
This document provides an overview of statistics concepts for entrepreneurs, including definitions of correlation, methods for calculating correlation like rank correlation and Karl Pearson's method, minimum and maximum correlation values, index numbers, time series analysis concepts like moving averages, forecasting techniques, and smoothing methods. It also includes examples and download links for further reference materials on business statistics.
The document discusses normal distributions and provides the following key points:
1. A normal distribution is a continuous probability distribution that has a bell-shaped curve and is described by its mean and standard deviation.
2. The probability of a random variable being equal to any exact value is zero for a continuous distribution, but the probability of it lying within a range of values is not zero.
3. The normal distribution is commonly used because it can be fully described using its mean and standard deviation, and tables of the standard normal distribution N(0,1) allow probabilities and values to be easily looked up.
1) The document contains 13 multiple choice questions about measures of dispersion including range, coefficient of dispersion, quartile deviation, coefficient of variation, variance, standard deviation, and skewness.
2) It asks to calculate various statistical measures from given data sets, identify which year data was more consistent between two data sets, and identify properties of symmetrical, negatively skewed, and positively skewed distributions.
3) The answers to each of the 13 multiple choice questions are provided at the end.
The document discusses different measures of central tendency including arithmetic mean. It provides formulas and examples for calculating arithmetic mean using direct, discrete and continuous series. It also discusses methods like step deviation and shot-cut for calculating mean and provides examples. It further discusses concepts like finding correct mean when initial mean is incorrect, calculating combined mean of two series and finding missing frequency from the data where mean is given.
The document provides a warm-up section with 4 math problems and a test review section with additional math problems and graphs. It summarizes as follows:
1) The warm-up section contains 4 math problems involving simplifying expressions, sharing money in a ratio, adding fractions, and determining probabilities.
2) The test review section provides additional problems on graphing lines, interpreting slope and y-intercepts, comparing options with different costs structures, and using point-slope form to solve a problem about a roller coaster ride.
3) Graphs are presented showing pricing options and the path of a roller coaster to illustrate the concepts of slope and y-intercept.
This document provides an overview of random variables and probability distributions. It defines discrete and continuous random variables and gives examples of each. Discrete random variables have probabilities associated with each possible value, while continuous random variables are defined by probability density functions where the area under the curve equals the probability. The document discusses how to calculate the mean, variance and standard deviation of discrete random variables from their probability distributions. It also covers how the mean and variance are affected for linear transformations of random variables.
This document provides instructions for students to complete algebra warm up problems involving graphing lines from equations. It outlines three methods for graphing lines: using the slope and y-intercept, using a T-chart, and manipulating equations into slope-intercept form. Students are informed they will be tested on using both the slope-intercept method and the T-chart method for graphing lines from equations. They are also told they will need to learn how to manipulate equations in standard form and point-slope form into slope-intercept form.
The document contains an agenda for a statistics class that includes topics such as the normal distribution, z-scores, and using a z-table to find probabilities. The agenda covers defining population and sample means and standard deviations, analyzing exam score data, continuous probability distributions, the properties of the normal distribution, and how to use a z-table to find probabilities for various z-scores and ranges of z-scores. Examples are provided to demonstrate how to find probabilities and areas under the normal curve. Homework problems are assigned from the textbook.
Proportions are equations where two ratios are equal, and can be written using colon notation like a:b::c:d or as equivalent fractions a/b = c/d. In a proportion, the product of the means is equal to the product of the extremes. To solve proportions, use cross multiplication and then solve for the variable. Proportions can be used to compare parts to parts, parts to whole, or other relationships like length to width.
Measures of Dispersion: Standard Deviation and Co- efficient of Variation RekhaChoudhary24
This document discusses measures of dispersion, specifically standard deviation and coefficient of variation. It begins by defining standard deviation as a measure of how spread out numbers are from the mean. It then provides the formula for calculating standard deviation and discusses its properties. Several examples are shown to demonstrate calculating standard deviation for individual data series using both the direct and shortcut methods. The document also discusses calculating standard deviation for discrete and continuous data series. It concludes by defining variance and coefficient of variation, and providing an example to calculate coefficient of variation and determine which of two company's share prices is more stable.
11.4 slope intercept form of a linear equationGlenSchlee
This document discusses graphing and writing equations of lines in slope-intercept form. It covers identifying the slope and y-intercept from an equation in slope-intercept form, graphing a line by using its slope and a given point, writing an equation of a line given its slope and a point, and graphing horizontal and vertical lines. Examples are provided to illustrate finding slope and y-intercept, graphing lines by plotting points, writing equations, and graphing horizontal and vertical lines using a given point.
The document discusses two mathematical models for estimating the time spent driving to school based on starting time:
1) A difference equation model that represents the number of cars on different roads over time using a matrix equation.
2) A differential equation model that represents the rate of change in the number of cars on each road over time using another matrix equation.
Both models aim to relate the number of cars on the road to the time spent driving, with the goal of estimating driving time for different departure times from school.
The document discusses finding the maximum area of a shape given its perimeter. It shows setting up equations for the perimeter and area, isolating variables, and determining that the maximum area of 75 occurs when x=5 and y=10. The area equation is differentiated to verify that the point (5,75) represents a maximum, not a minimum.
The document provides information and instructions for analyzing student exam score data. It includes:
1) A table of 80 exam scores ranging from 53 to 97.
2) Instructions to calculate descriptive statistics like minimum, maximum, range, and percentiles of the scores.
3) Directions to construct a frequency distribution table and histogram of the scores binned into intervals of 5.
4) A calculation of measures of central tendency (mean, median, mode) and dispersion (variance, standard deviation) of the scores.
5) An analysis of the distribution's asymmetry and kurtosis.
This document discusses the normal distribution and sampling. It begins by explaining that the normal distribution can be used to approximate a continuous random variable to an ideal situation. It describes key aspects of the normal distribution including its bell curve shape, parameters of mean and standard deviation, and the fact that 50% of values are above and below the mean. The document then discusses the standard normal distribution with a mean of 0 and standard deviation of 1. It provides examples of calculating probabilities using the normal distribution and standard normal tables. It concludes with examples of solving probability problems involving the normal distribution.
The document discusses trigonometric functions of angles. It defines the six trigonometric functions (sine, cosine, tangent, cotangent, secant and cosecant) in terms of positions in the Cartesian plane. It also discusses how the values of the trigonometric functions change for angles in different quadrants, and how to find reference angles. Examples are provided to demonstrate evaluating trigonometric functions using reference angles and special angle identities.
This PowerPoint was created to help out graduating seniors who are taking the TAKS Mathematics Exit-Level test. It includes formulas, rules & things that they need to remember to pass the test.
Please Subscribe to this Channel for more solutions and lectures
http://www.youtube.com/onlineteaching
Chapter 10: Correlation and Regression
10.2: Regression
I am Anthony F. I am a Math Exam Helper at liveexamhelper.com. I hold a Masters' Degree in Maths, University of Cambridge, UK. I have been helping students with their exams for the past 9 years. You can hire me to take your exam in Math.
Visit liveexamhelper.com or email info@liveexamhelper.com.
You can also call on +1 678 648 4277 for any assistance with Math Exams.
CHAPTER TENObjectiveA brief introduction of the basic conceptTawnaDelatorrejs
CHAPTER TEN
Objective:
A brief introduction of the basic concepts of Forecasting Tools like Moving average, Weighted Moving Average, Exponential Smoothing will be used to develop projection models.
Chapter Content:
Forecasting techniques:
Into our class we will use a simple product to manufacturer. A plush eraser will be our product (Note: Don’t blame my drawing, only look at and enjoy it.).
The first technique will be Moving Average (MA). This forecasting technique consists in the estimate of a average value from historical data that move as the new present value it’s know. This average is determinated by a series of terms or established periods (n). The quantity of periods (n) will be based in the variation that it exists between the historical data. If there is large variation, the value (n) must be greater to reflect the variation. If there is small variation, the value (n) can be smaller.
Let us suppose that the following table shown the eraser’s demand for first six months of production.
Period (Month)
Demand
1
1250
2
1590
3
1340
4
1510
5
1486
6
1440
Using the Moving Average equation:
(
)
n
i
t
A
t
MA
å
-
=
)
(
Where: MA(t) is the forecasting for period t
A(t-i) is the present for period t-i
(n) is the number of periods to average
If we looking for the forecasting for the fifth period, using n=2 and n=3, which would be the answer?
N=2
N=3
A(4) = 1510
A(4) = 1510
A(3) = 1340
A(3) = 1340
---------------
A(2) = 1590
Σ = 2850
Σ = 4440
n = 2
n = 3
MA(5) = 1425
MA(5) = 1480
The average changes of period when calculating the next forecasting. When forecast the sixth period, the terms to be used for the average change according to the following example:
N=2
N=3
A(5) = 1486
A(5) = 1486
A(4) = 1510
A(4) = 1510
---------------
A(3) = 1340
Σ = 2996
Σ = 4336
n = 2
n = 3
MA(5) = 1498
MA(5) = 1445.3
The next technique known like Weighted Moving Average, this technique to difference of regular moving average, each period have a weight assigned as output probability. The Moving average to divide the periods sum between the value (n), indirectly,
it’s giving the same probability o weight to each period to determine the forecasting.
(
)
(
)
å
-
-
=
i
t
xW
i
t
A
t
WMA
)
(
Where t is the hoped period and i value run from 1 to n.
Example, determining the sixth forecasting, with (n) = 2
Mov. Average Reg
Weighted MA
A(5) = 1486 x (50%)
A(5) = 1486 x (75%)
A(4) = 1510 x (50%)
A(4) = 1510 x (25%)
MA(6) = 1498
WMA(6) = 1492
This technique allow to assign a weight or probability according to expect behavior from marketing influences. I.e. to assign greater weight to the period value most recent a cause of a promotion. The quantity of periods or term to be used for estimate the forecast depends of the variation that exists between the historical data. That means, follow the same concept of moving average.
The third technique is the Exponential Smoothing. This forecasting technique allows a ...
This document provides an overview of statistics concepts for entrepreneurs, including definitions of correlation, methods for calculating correlation like rank correlation and Karl Pearson's method, minimum and maximum correlation values, index numbers, time series analysis concepts like moving averages, forecasting techniques, and smoothing methods. It also includes examples and download links for further reference materials on business statistics.
1) The document examines whether the digits of pi have a random sequence by counting the occurrences of numbers 0-9 in the first 1,000 decimal places of pi and performing a chi-square test.
2) The results of the chi-square test show that the null hypothesis that each number 0-9 appears with equal probability can be rejected at the 10% significance level, indicating the sequence of digits in pi is not truly random.
3) Therefore, pi is not considered a good source of random numbers that could be used for encryption or other applications requiring a random sequence. Some regularity may exist in the digits of pi.
This document provides information about getting fully solved assignments for the summer 2015 semester for MCA students. It includes contact information to email or call for assistance with assignments in subjects like Probability and Statistics. Sample assignments are provided covering topics like probability, distributions, trend lines, and standard deviation. Students should contact the given email or phone number to get help with their MCA semester 4 assignments.
simple linear regression - brief introductionedinyoka
Goal of regression analysis: quantitative description and
prediction of the interdependence between two or more variables.
• Definition of the correlation
• The specification of a simple linear regression model
• Least squares estimators: construction and properties
• Verification of statistical significance of regression model
The learning outcomes of this topic are:
- Recognize the terms sample statistic and population parameter
- Use confidence intervals to indicate the reliability of estimates
- Know when approximate large sample or exact confidence intervals are appropriate
This topic will cover:
- Sampling distributions
- Point estimates and confidence intervals
- Introduction to hypothesis testing
This document introduces numerical analysis and discusses floating point numbers. It covers topics such as absolute and relative errors, roundoff and truncation errors, Taylor series approximations, interpolation methods, solving nonlinear equations, numerical differentiation and integration, numerical solutions to differential equations, and linear algebra techniques. Example C programs are provided to illustrate various numerical methods.
This document discusses the normal distribution and its key properties. It also discusses sampling distributions and the central limit theorem. Some key points:
- The normal distribution is bell-shaped and symmetric. It is defined by its mean and standard deviation. Approximately 68% of values fall within 1 standard deviation of the mean.
- Sample statistics like the sample mean follow sampling distributions. When samples are large and random, the sampling distributions are often normally distributed according to the central limit theorem.
- Correlation and regression analyze the relationship between two variables. Correlation measures the strength and direction of association, while regression finds the best-fitting linear relationship to predict one variable from the other.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601
This document provides information about getting fully solved assignments from an assignment help service. It lists a contact email and phone number to send requests to along with details of 6 sample assignments covering subjects like probability, statistics, data analysis, and more. Students can send their semester and specialization to get solved assignments to help with their coursework.
1. Experiment=1<br />A program to generate PDF of random number<br />clc<br />clear all<br />clf<br />n=input('enter the no.of random data');<br />y=rand(1,n);<br />t=0.1;<br />for i=1:10<br /> k=(y>t*(i-1)&y<t*i);<br /> b(i)=sum(k);<br /> x(i)=b(i)/(n*t);<br /> disp(x(i));<br />end<br />h=[.1 .2 .3 .4 .5 .6 .7 .8 .9 1]; <br />s=plot(h,x);<br />axis([0.1 1 0 7]);<br />ylabel('PDF');<br />xlabel('random no.');<br />title('PDF of random no.');<br />enter the no.of random data2000<br /> 1.0650<br /> 0.9550<br /> 0.9650<br /> 0.9950<br /> 1.0550<br /> 0.8950<br /> 1.0850<br /> 0.9200<br /> 1.0250<br /> 1.0400<br /> Experiment no. =2<br />Generation of random number using Linear Congruential Method<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />d=input('enter the value of modulus m in terms of small integer=');<br />m=input('enter the value of modulus m=')<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br /> <br />%%%% CASE-1ST %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of small integer<br /> <br />if c==0 && m==d<br /> disp('it is multiplicative congruential method');<br /> for i=1:m<br /> a=17;<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-2ND %%%%%%<br />%when the value of increment is other than zero and the value of modulus is<br />%in terms of small integer<br /> <br />else if c~=0 && m==d<br /> disp('it is mixed congruential method');<br /> for i=1:m<br /> a=17;<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-3RD %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of %modulus is in terms of 2^b<br /> <br /> else if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-4TH %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br /> end<br /> end<br />end<br />disp(R); % displaying all the random numbers<br />Experiment =1<br />RESULT<br /> CASE-1ST<br />when the value of increment is equal to zero and the value of modulus is in terms of small integer<br />enter the value of seed X(1)=27<br />enter the value of increment c=0<br />enter the value of modulus m in terms of small integer=100<br />enter the value of modulus m=100<br />m =100<br />enter the value of b=6<br />enter the value of an integer k=1<br />it is multiplicative congruential method<br /> Columns 1 through 15 <br /> 0 0.5900 0.0300 0.5100 0.6700 0.3900 0.6300 0.7100 0.0700 0.1900 0.2300 0.9100 0.4700 0.9900 0.8300<br /> Columns 16 through 30 <br /> 0.1100 0.8700 0.7900 0.4300 0.3100 0.2700 0.5900 0.0300 0.5100 0.6700 0.3900 0.6300 0.7100 0.0700 0.1900<br /> Columns 31 through 45 <br /> 0.2300 0.9100 0.4700 0.9900 0.8300 0.1100 0.8700 0.7900 0.4300 0.3100 0.2700 0.5900 0.0300 0.5100 0.6700<br /> Columns 46 through 60 <br /> 0.3900 0.6300 0.7100 0.0700 0.1900 0.2300 0.9100 0.4700 0.9900 0.8300 0.1100 0.8700 0.7900 0.4300 0.3100<br /> Columns 61 through 75 <br /> 0.2700 0.5900 0.0300 0.5100 0.6700 0.3900 0.6300 0.7100 0.0700 0.1900 0.2300 0.9100 0.4700 0.9900 0.8300<br />Columns 76 through 90 <br /> 0.1100 0.8700 0.7900 0.4300 0.3100 0.2700 0.5900 0.0300 0.5100 0.6700 0.3900 0.6300 0.7100 0.0700 0.1900<br /> Columns 91 through 100 <br /> 0.2300 0.9100 0.4700 0.9900 0.8300 0.1100 0.8700 0.7900 0.4300 0.3100<br />CASE-2ND <br />when the value of increment is other than zero and the value of modulus is in terms of small integer<br />enter the value of seed X(1)=27<br />enter the value of increment c=43<br />enter the value of modulus m in terms of small integer=100<br />enter the value of modulus m=100<br />m = 100<br />enter the value of b=6<br />enter the value of an integer k=1<br />it is mixed congruential method<br /> <br /> Columns 1 through 15 <br /> 0 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700<br /> Columns 16 through 30 <br /> 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200<br /> Columns 31 through 45 <br /> 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700<br /> Columns 46 through 60 <br /> 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200<br /> Columns 61 through 75 <br /> 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700<br /> Columns 76 through 90 <br /> 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200<br /> Columns 91 through 100 <br /> 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200 0.2700 0.0200 0.7700 0.5200<br />CASE-3RD <br />when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is in terms of 2^b<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of modulus m in terms of small integer=100<br />enter the value of modulus m=64<br />m = 64<br />enter the value of b=6<br />enter the value of an integer k=1<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period =64<br />a = 5<br />Columns 1 through 15 <br /> 0 0.1250 0.6719 0.4063 0.0781 0.4375 0.2344 0.2188 0.1406 0.7500 0.7969 0.0313 0.2031 0.0625 0.3594<br /> Columns 16 through 30 <br /> 0.8438 0.2656 0.3750 0.9219 0.6563 0.3281 0.6875 0.4844 0.4688 0.3906 0 0.0469 0.2813 0.4531 0.3125<br /> Columns 31 through 45 <br /> 0.6094 0.0938 0.5156 0.6250 0.1719 0.9063 0.5781 0.9375 0.7344 0.7188 0.6406 0.2500 0.2969 0.5313 0.7031<br /> Columns 46 through 60 <br /> 0.5625 0.8594 0.3438 0.7656 0.8750 0.4219 0.1563 0.8281 0.1875 0.9844 0.9688 0.8906 0.5000 0.5469 0.7813<br /> Columns 61 through 64 <br /> 0.9531 0.8125 0.1094 0.5938<br />CASE-4TH<br />when the value of increment is equal to zero and the value of modulus is in terms of 2^b and the seed is an odd number<br />enter the value of seed X(1)=1<br />enter the value of increment c=0<br />enter the value of modulus m in terms of small integer=100<br />enter the value of modulus m=64<br />m = 64<br />enter the value of b=6<br />enter the value of an integer k=1<br />if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method<br />a =11<br />Period = 16<br />Columns 1 through 15 <br /> 0 0.1719 0.8906 0.7969 0.7656 0.4219 0.6406 0.0469 0.5156 0.6719 0.3906 0.2969 0.2656 0.9219 0.1406<br /> Columns 16 through 30 <br /> 0.5469 0.0156 0.1719 0.8906 0.7969 0.7656 0.4219 0.6406 0.0469 0.5156 0.6719 0.3906 0.2969 0.2656 0.9219<br /> Columns 31 through 45 <br /> 0.1406 0.5469 0.0156 0.1719 0.8906 0.7969 0.7656 0.4219 0.6406 0.0469 0.5156 0.6719 0.3906 0.2969 0.2656<br /> Columns 46 through 60 <br /> 0.9219 0.1406 0.5469 0.0156 0.1719 0.8906 0.7969 0.7656 0.4219 0.6406 0.0469 0.5156 0.6719 0.3906 0.2969<br /> Columns 61 through 64 <br /> 0.2656 0.9219 0.1406 0.5469<br />Experiment= 3<br />Kolmogorov-Smirnov test for uniformity of random numbers<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />Q=input('enter the specified significance level Q (it can be 0.10,0.05 or 0.01)=')<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> Y(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> Y(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br /> <br />%step 2.) RANK THE DATA FROM SMALLEST TO LARGEST<br />R=sort(Y);<br />disp(R)<br />N= m %sample size <br />for i=1:m<br /> d1(i)= i/N-R(i);<br /> d2(i)=R(i)-(i-1)/N;<br />end<br /> <br />%step 3.) COMPUTATION OF LARGEST DEVIATION OF SN(x) ABOVE F(x)<br />D1 = max(d1) %largest deviation of SN(x) above F(x) <br /> <br />%step 4.) COMPUTATION OF LARGEST DEVIATION OF SN(x) BELOW F(x)<br />D2 = max(d2) %largest deviation of SN(x) below F(x)<br /> <br />%step 5.) COMPUTATION OF SAMPLE STATISTIC VALUE<br />D= max(D1,D2) %sample statistic <br /> <br />%step 6.) COMPUTATION OF CRITICAL SAMPLE STATISTIC VALUE<br />if Q==0.10<br /> p= 1.22/(N^(1/2));<br /> disp('the critical value DQ=') <br /> DQ=p %the critical sample statistic value <br />else if Q==0.05<br /> p= 1.36/(N^(1/2));<br /> disp('the critical value DQ=')<br /> DQ=p %the critical sample statistic value <br /> else if Q==0.01<br /> p= 1.63/(N^(1/2));<br /> disp('the critical value DQ=')<br /> DQ=p %the critical sample statistic value<br /> end <br /> end<br />end<br /> <br />%step 7.) DECISION FOR UNIFORM DISTRIBUTION<br />if D>DQ<br /> disp('the null hypothesis that the data are a sample form a unoform distribution is rejected or we can say that the random numbers generated are not uniformly distributed');<br />else<br /> disp('the test shows that no difference has been detected between the true distribution and the uniform distribution or we can say that the generated random numbers are uniformly distributed')<br />end <br />Experiment no. =3<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=6<br />enter the value of an integer k=1<br />enter the specified significance level Q (it can be 0.10,0.05 or 0.01)=0.05<br />Q = 0.0500<br />m = 64<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 64<br />a = 5<br />Columns 1 through 15 <br /> 0 0 0.0313 0.0469 0.0625 0.0781 0.0938 0.1094 0.1250 0.1406 0.1563 0.1719 0.1875 0.2031 0.2188<br /> Columns 16 through 30 <br /> 0.2344 0.2500 0.2656 0.2813 0.2969 0.3125 0.3281 0.3438 0.3594 0.3750 0.3906 0.4063 0.4219 0.4375 0.4531<br /> Columns 31 through 45 <br /> 0.4688 0.4844 0.5000 0.5156 0.5313 0.5469 0.5625 0.5781 0.5938 0.6094 0.6250 0.6406 0.6563 0.6719 0.6875<br /> Columns 46 through 60 <br /> 0.7031 0.7188 0.7344 0.7500 0.7656 0.7813 0.7969 0.8125 0.8281 0.8438 0.8594 0.8750 0.8906 0.9063 0.9219<br /> Columns 61 through 64 <br /> 0.9375 0.9531 0.9688 0.9844<br />N = 64<br />D1 = 0.0313<br />D2 = 0<br />D = 0.0313<br />the critical value DQ=<br />DQ = 0.1700<br />the test shows that no difference has been detected between the true distribution and the uniform distribution or we can say that the generated random numbers are uniformly distributed<br /> Experiment no. =4<br />Run test for testing the independence of generated random numbers<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />Q= 0.05 %enter the specified significance level Q <br />Z=1.96<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />S=sum(R) %sum of random numbers <br />N=length(R) %length of random numbers<br />M= S/N %mean of random numbers<br />n1=0; %n1=numbers of individual observations above the mean<br />n2=0; %n2=numbers of individual observations below the mean<br />for i=1:N<br /> if R(i)> M<br /> n1=n1+1;<br /> else n2=n2+1;<br /> end<br />end<br />disp('numbers of individual observations above the mean n1=');<br />disp(n1)<br />disp('numbers of individual observations below the mean n2=');<br />disp(n2)<br />mean=(2*n1*n2)/N+(1/2);<br />variance=2*n1*n2*(2*n1*n1-N)/(N^2*(N-1));<br />b=0;<br />for i=1:N-1<br /> if R(i)>M && R(i+1)<M<br /> b=b+1;<br /> else if R(i)<M && R(i+1)>M<br /> b=b+1;<br /> end<br /> end<br />end<br />disp('total no. of runs are b =')<br />disp(b)<br />Zo=(b-mean)/((variance)^(1/2))<br />if -Z<Zo<Z<br /> disp('Hypothesis of independence cannot be rejected on the basis of this test')<br />else<br /> disp('Hypothesis of independence is rejected on the basis of this test')<br />end <br /> <br />Experiment no.=4<br />RESULT<br />enter the value of seed X(1)=5<br />enter the value of increment c=7<br />enter the value of b=6<br />enter the value of an integer k=1<br />Q = 0.0500<br />Z = 1.9600<br />m = 64<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 64<br />a = 5<br />Columns 1 through 15 <br /> 0 0.5000 0.6094 0.1563 0.8906 0.5625 0.9219 0.7188 0.7031 0.6250 0.2344 0.2813 0.5156 0.6875 0.5469<br /> Columns 16 through 30 <br /> 0.8438 0.3281 0.7500 0.8594 0.4063 0.1406 0.8125 0.1719 0.9688 0.9531 0.8750 0.4844 0.5313 0.7656 0.9375<br /> Columns 31 through 45 <br /> 0.7969 0.0938 0.5781 0 0.1094 0.6563 0.3906 0.0625 0.4219 0.2188 0.2031 0.1250 0.7344 0.7813 0.0156<br /> Columns 46 through 60 <br /> 0.1875 0.0469 0.3438 0.8281 0.2500 0.3594 0.9063 0.6406 0.3125 0.6719 0.4688 0.4531 0.3750 0.9844 0.0313<br /> Columns 61 through 64 <br /> 0.2656 0.4375 0.2969 0.5938<br />S = 31.4219<br />N = 64<br />M = 0.4910<br />numbers of individual observations above the mean n1= 32<br />numbers of individual observations below the mean n2= 32<br />total no. of runs are b = 29<br />Zo = -0.8820<br />Hypothesis of independence cannot be rejected on the basis of this test<br />Experiment no.=5<br />Autocorrelation test<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />disp('at the specified significance level Q (it can be 0.10,0.05 or 0.01)=0.05')<br />Z=1.96<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />disp(R)<br />N=length(R)<br />i=input('enter the value of starting number=')<br />n=input('enter the value of lag=')<br />M= floor((N-i)/n-1)<br />for k=0:M<br /> b=R(i+k*n)*R(i+(k+1)*n);<br />end<br />c=sum(b)<br />Pin=((1/(M+1))*c)-0.25<br />S.D=(((13*M)+7)^(1/2))/(12*(M+1))<br />Zo=Pin/S.D<br />if -Z<Zo<Z<br /> disp('do not reject the null hypothesis of independence')<br />else <br /> disp('reject the null hyrothesis of independence')<br />end<br /> <br />Experiment no.=5<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=6<br />enter the value of an integer k=1<br />at the specified significance level Q (it can be 0.10,0.05 or 0.01)=0.05<br />Z =1.9600<br />m = 64<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 64<br />a = 5<br />Columns 1 through 15 <br /> 0 0.1250 0.6719 0.4063 0.0781 0.4375 0.2344 0.2188 0.1406 0.7500 0.7969 0.0313 0.2031 0.0625 0.3594<br /> Columns 16 through 30 <br /> 0.8438 0.2656 0.3750 0.9219 0.6563 0.3281 0.6875 0.4844 0.4688 0.3906 0 0.0469 0.2813 0.4531 0.3125<br /> Columns 31 through 45 <br /> 0.6094 0.0938 0.5156 0.6250 0.1719 0.9063 0.5781 0.9375 0.7344 0.7188 0.6406 0.2500 0.2969 0.5313 0.7031<br /> Columns 46 through 60 <br /> 0.5625 0.8594 0.3438 0.7656 0.8750 0.4219 0.1563 0.8281 0.1875 0.9844 0.9688 0.8906 0.5000 0.5469 0.7813<br /> Columns 61 through 64 <br /> 0.9531 0.8125 0.1094 0.5938<br />N = 64<br />enter the value of starting number=2<br />i = 2<br />enter the value of lag=5<br />n = 5<br />M = 11<br />c = 0.7236<br />Pin = -0.1897<br />S . D= 0.0851<br />Zo = -2.2304<br />do not reject the null hypothesis of independence<br /> <br />Experiment no.=6<br />Generation of exponential distributed random number<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />%disp(R)<br />N=length(R)<br />%inverse transform technique to sample from the exponential distribution<br />L=input('enter the value of mean number of occurences per unit time(L)=')<br />for i=1:N<br /> Y(i)=-(1/L)*log(1-R(i));<br />end<br />%disp(Y)<br />t=0.1;<br />for i=1:70<br /> k=(Y>t*(i-1)&Y<t*i);<br /> b(i)=sum(k);<br /> x(i)=b(i)/(N*t);<br /> %disp(x(i))<br />end<br />%disp(b);<br />d=0.1:0.1:7<br />plot(d,x)<br />axis([0.1 7 0 1]);<br />xlabel('random number');<br />ylabel('PDF');<br />title('PDF of exponentially distributed random numbers');<br />Experiment no.:-6<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=12<br />enter the value of an integer k=1<br />m = 4096<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 4096<br />a = 5<br />N = 4096<br />enter the value of mean number of occurences per unit time(L)=1<br />L = 1<br />Experiment no.:-7<br /> Generation of normal distributed random number<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />%disp(R)<br />N=length(R)<br />%Direct transformation method to generate normal distributed random no.<br />for i=1:m/2<br /> Z(2*i-1)=((-2*log(R(2*i-1)))^(1/2))*cos(2*pi*R(2*i));<br /> Z(2*i)=((-2*log(R(2*i-1)))^(1/2))*sin(2*pi*R(2*i));<br />end<br />u=8;<br />j=2;<br />disp('value of mean u is 8');<br />disp('value of varience j is 2');<br />for i=1:N<br /> Y(i)=u+(j^1/2)*Z(i);<br />end<br />%Plot of pdf of normal distributed random no.<br />t=0.1;<br />for i=1:120<br /> k=(Y>t*(i-1)&Y<t*i);<br /> b(i)=sum(k);<br /> x(i)=b(i)/(N*t);<br /> %disp(x(i));<br />end<br />h=0.1:0.1:12; <br />s=plot(h,x);<br />axis([4 12 0 2]);<br />ylabel('PDF');<br />xlabel('random no.');<br />title('PDF of normal distributed random no.');<br /> <br /> Experiment no.:-7<br />RESULT<br />enter the value of seed X(1)=254<br />enter the value of increment c=5<br />enter the value of b=15<br />enter the value of an integer k=11<br />m = 32768<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 32768<br />a = 45<br />N = 32768<br />value of mean u is 8<br />value of varience j is 2<br /> Experiment no.:-8<br />Generation of weibull distributed random number<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> End <br /> end<br />end<br />%disp(R)<br />N=length(R)<br />%Inverse transform technique to generate weibull distributed random no.<br />a=input('enter the value of location parameter a=');<br />B=input('enter the value of scale parameter B=');<br />for i=1:m<br /> Y(i)=a*((-log(1-R(i)))^1/B);<br />end<br />%Plot of pdf of weibull distributed random no.<br />t=0.1;<br />for i=1:100<br /> k=(Y>t*(i-1)&Y<t*i);<br /> b(i)=sum(k);<br /> x(i)=b(i)/(N*t);<br /> %disp(x(i));<br />end<br />h=0.1:0.1:10; <br />s=plot(h,x);<br />axis([0 5 0 2]);<br />ylabel('PDF');<br />xlabel('random no.');<br />title('PDF of weibull distributed random no.');<br />Experiment no.:-8<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=15<br />enter the value of an integer k=1<br />m = 32768<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 32768<br />a = 5<br />N = 32768<br />enter the value of location parameter a=0.5<br />enter the value of scale parameter B=0.5<br />>><br />Experiment no.:-9<br />Generation of uniformly distributed random no. using CDF<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />%disp(R)<br />N=length(R)<br />%inverse transform technique to sample from the exponential distribution<br />disp(' the value lower limit of interval is a=3');<br />disp(' the value of upper limit of interval is b=7');<br />a=3;<br />b=7;<br />for i=1:N<br /> Y(i)=a+((b-a)*R(i));<br />end<br />%plot of pdf of uniformly distributed random no.in interval [a,b]<br />t=0.1;<br />for i=1:40<br /> k=Y>a+((i-1)*t)&Y<a+(t*i);<br /> b(i)=sum(k);<br /> x(i)=b(i)/(N*t);<br />end<br />h=3.1:0.1:7;<br />plot(h,x)<br />axis([1 9 0 0.5]);<br />xlabel('random no')<br />ylabel('PDF')<br />title('PDF of uniformly distributed random no. is [1/(b-a)=1/4=0.25]');<br /> <br />Experiment no.:-9<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=14<br />enter the value of an integer k=1<br />m = 16384<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 16384<br />a = 5<br />N = 16384<br /> the value lower limit of interval is a=3<br /> the value of upper limit of interval is b=7<br />Experiment no.:-10<br />Generation of triangular distributed random number using CDF<br />clc<br />clf<br />clear all<br />X(1)=input('enter the value of seed X(1)=');<br />c=input('enter the value of increment c=');<br />b=input('enter the value of b=');<br />k=input('enter the value of an integer k=');<br />m=2^b %value of modulus<br /> <br />% step 1.)GENERATION OF RANDOM NUMBERS USING LINEAR CONGRUENTIAL METHOD<br /> <br />%%%% CASE-first %%%%%%<br />%when the value of increment is other than zero and is relatively a prime number to m and the value of modulus is<br />%in terms of 2^b<br /> <br />if c~=0 && m==2^b<br /> disp('if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method');<br /> Period= m %calculation of period <br /> a= 1+(4*k) %calculation of multiplier <br /> for i=1:m-1<br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers <br /> end<br /> <br />%%%% CASE-second %%%%%%<br />%when the value of increment is equal to zero and the value of modulus is<br />%in terms of 2^b and the seed is an odd number<br /> <br /> else if c==0 && m==2^b<br /> disp('if X(1) is odd then the longest possible period is P = m/4=2^(b-2) and it is multiplicative congruential method');<br /> a=3+(8*k) %calculation of multiplier <br /> Period= m/4 %calculation of period <br /> for i=1:m-1 <br /> X(i+1)= mod((a*X(i)+c),m); %calculation of the random integers<br /> R(i+1)=X(i+1)/m; %calculation of the random numbers<br /> end<br /> end<br />end<br />%disp(R)<br />N=length(R)<br />%Inverse transform technique to generate trianguiar distributed random no.<br />for i=1:N<br /> if R(i)<=0.5<br /> Y(i)=(2*R(i))^(1/2);<br /> else<br /> Y(i)=(2-(2*(1-R(i)))^(1/2));<br /> end<br />end<br />t=0.1;<br />for i=1:21<br />k=Y>(i-1)*t & Y<i*t;<br />b(i)=sum(k);<br />x(i)=b(i)/(N*t);<br />end<br />h=0:0.1:2;<br />plot(h,x)<br />axis([0 2 0 2])<br />xlabel('random no.')<br />ylabel('PDF')<br />title('PDF of triangular distributed random no.')<br />Experiment no.:-10<br />RESULT<br />enter the value of seed X(1)=1<br />enter the value of increment c=3<br />enter the value of b=15<br />enter the value of an integer k=1<br />m =<br /> 32768<br />if c is relatively prime to m then the longest possible period is P = m=2^b and it is mixed congruential method<br />Period = 32768<br />a = 5<br />N = 32768<br /> Experiment no.=11<br />Generation of amplitude modulated waveform<br />clc<br />clear all<br />Vm=input('enter the value of amplitude of modulating signal=');<br />A=input('enter the value of amplitude of carrier signal=');<br />fm=input('enter the value of modulating frequency=');<br />fc=input('enter the value of carrier frequency=');<br />t=0:0.001:1;<br />x=Vm*cos(2*pi*fm*t); % modulating signal<br />%%%%%%%%%%%<br />subplot(4,1,1);<br />plot(t,x)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**modulating signal**');<br />c=A*cos(2*pi*fc*t); % carrier signal<br />%%%%%%%%%%<br />subplot(4,1,2);<br />plot(t,c)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**carrier signal**');<br />m=Vm/A;<br />s=(A*cos(2*pi*fc*t)).*(1+m.*cos(2*pi*fm*t)); % amplitude modulated signal<br />%%%%%%%%%%%%<br />subplot(4,1,3);<br />plot(t,s)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**amplitude modulated signal**');<br />y=c.*x; %DSB-SC signal <br />subplot(4,1,4);<br />plot(t,y)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**double side band supressed carrier signal**');<br /> <br />enter the value of amplitude of modulating signal=3<br />enter the value of amplitude of carrier signal=5<br />enter the value of modulating frequency=10<br />enter the value of carrier frequency=50<br />Experiment no.=12<br />Generation of frequency modulated wave<br />clc<br />clf<br />clear all<br />fm=input('enter the value of modulating frequency=');<br />fc=input('enter the value of carrier frequency=');<br />Vm=input('enter the value of amp of modulating signal=');<br />A=input('enter the valur of amp of carrier signal=');<br />mf=input('enter the value of modulating index=');<br />t=0:0.001:1;<br />x=Vm*cos(2*pi*fm*t); % modulating signal<br />%%%%%%%%%%%<br />subplot(3,1,1);<br />plot(t,x)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**modulating signal**');<br />%%%%%%%%%%%%%<br />c=A*cos(2*pi*fc*t); % carrier signal<br />subplot(3,1,2);<br />plot(t,c)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**carrier signal**');<br />%%%%%%%%%%%%%%<br />s=A*cos(2*pi*fc*t+mf*sin(2*pi*fm*t)); % frequency modulated signal<br />subplot(3,1,3);<br />plot(t,s)<br />xlabel('time(second)->');<br />ylabel('amplitude->');<br />title('**frequency modulated signal**');<br />enter the value of modulating frequency=10<br />enter the value of carrier frequency=50<br />enter the value of amp of modulating signal=4<br />enter the valur of amp of carrier signal=5<br />enter the value of modulating index=4<br />Experiment no.=13<br />Generation of phase modulated signal<br />clc<br />clear all<br />fm=input('enter the value of modulating frequency=');<br />fc=input('enter the value of carrier frequency=');<br />Vm=input('enter the value of amp of modulating signal=');<br />A=input('enter the valur of amp of carrier signal=');<br />mp=input('enter the value of modulating index=');<br />t=0:0.001:1;<br />x=Vm*cos(2*pi*fm*t); % modulating signal<br />%%%%%%%%%%%<br />subplot(3,1,1);<br />plot(t,x)<br />xlabel('time(second)');<br />ylabel('amplitude');<br />title('modulating signal');<br />%%%%%%%%%%%%<br />c=A*cos(2*pi*fc*t); % carrier signal<br />subplot(3,1,2);<br />plot(t,c)<br />xlabel('time(second)');<br />ylabel('amplitude');<br />title('carrier signal');<br />%%%%%%%%%%%%%%%%%<br />s=A*cos(2*pi*fc*t+mp*cos(2*pi*fm*t)); % phase modulated signal<br />subplot(3,1,3);<br />plot(t,s)<br />xlabel('time(second)');<br />ylabel('amplitude');<br />title('phase modulated signal');<br />enter the value of modulating frequency=10<br />enter the value of carrier frequency=50<br />enter the value of amp of modulating signal=4<br />enter the valur of amp of carrier signal=4<br />enter the value of modulating index=7<br />>><br />Experiment no.=14<br />Modulation and demodulation using amplitude shift keying<br />clc<br />clf<br />clear all<br />A=input('enter the value of carrier amplitude=');<br />n=input('enter the number of input data=');<br />x=rand(1,n);<br />%converting the signal( random num)into bipolar form<br />for i=1:10<br /> if(x(i)<0.5)<br /> y(i)=0;<br /> else y(i)=1;<br /> end<br />end<br />subplot(4,2,1); %plotting the input signal<br />stem(y);<br />axis([1 10 -1 1]);<br />title('**input signal**');<br />%plotting the carrier signal<br /> t=1:0.001:10;<br /> c=A*sin(2*pi*3*t);<br /> subplot(4,2,2);<br /> plot(t,c);<br /> xlabel('time->');<br /> ylabel('amplitude->');<br /> title('**carrier signal**');<br /> % plotting the ask signal<br /> for i=1:10<br /> t= i:0.001:(i+1);<br /> s=A*(sin(2*pi*3*t))*y(i);<br /> subplot(4,2,3);<br /> plot(t,s);<br /> hold on;<br /> axis([1 10 -5 5]);<br /> xlabel('time->');<br /> ylabel('amplitude');<br /> title('**ask modulated signal**');<br /> <br /> <br /> %sending modulated signal over awgn channel<br /> <br /> u=awgn(s,5,2);<br /> subplot(4,2,4);<br /> plot(t,u);<br /> hold on;<br /> axis([1 10 -10 10]);<br /> title('signal at reciever');<br /> xlabel('time-->');<br /> ylabel('amplitude');<br /> %operating recieved with LO<br /> recieved=sin(2*pi*3*t).*u; <br /> subplot(4,2,5);<br /> plot(t,recieved);<br /> hold on;<br /> axis([1 10 -10 10]);<br /> title('signal at reciever');<br /> xlabel('time-->');<br /> ylabel('amplitude');<br /> %applying integration on signal using successive summation approach<br /> v=1;<br /> w=sin(2*pi*3*t).*s;<br /> for t=i:0.001:(i+1);<br /> p(i)=sum(w(i:v));<br /> v=v+1;<br /> end<br /> v=1;<br /> subplot(4,2,6);<br /> for t=i:0.001:(i+1)<br /> m(i)=sum(recieved(i:v));<br /> plot(t,m(i));<br /> hold on<br /> v=v+1;<br /> end<br /> title('signal at reciever after integration');<br /> xlabel('time-->');<br /> ylabel('amplitude');<br /> end<br /> decision=max(p)/2;<br /> subplot(4,2,7);<br /> for i=1:10<br /> if m(i)>=decision<br /> y(i)=1;<br /> elseif m(i)< decision <br /> y(i)=0;<br /> end<br /> stem(y);<br /> axis([1 10 -1 1]);<br /> hold on;<br /> title('recieved data bits');<br /> end<br /> <br />RESULT (Experiment no.=14)<br />enter the value of carrier amplitude=5<br />enter the number of input data=10<br />>> <br /> <br />Experiment no.=15<br />Generation of Frequency Shift Keying<br />%Experiment-6<br />% Generation of frequency shift keying<br />clc<br />clear all<br />clf<br />fc=input('enter the value of carrier angular frequency=');<br />A=input('enter the value of carrier amplitude=');<br />n=input('enter the number of input data=');<br />x=rand(1,n);<br />%converting the signal(random num)into bipolar form<br />for i=1:n<br /> if(x(i)<0.5)<br /> y(i)=-1;<br /> else y(i)=1;<br /> end<br />end<br />%plotting the input signal<br />subplot(3,1,1);<br />stairs(y);<br />axis([1,10,-2,2]);<br />%plotting the carrier signal<br /> t=1:0.01:10;<br /> c=A*cos(2*pi*fc*t); %carrier signal<br /> subplot(3,1,2);<br /> plot(t,c);<br /> xlabel('time(second)->');<br /> ylabel('amplitude->');<br /> title('**carrier signal**');<br /> % plotting the fsk signal<br /> subplot(3,1,3);<br /> for t=1:9<br /> for i = t:0.01:t+1<br /> s=A*(cos(2*pi*(fc+2*y(t))*i)); %fsk modulated signal<br /> plot(i,s);<br /> hold on;<br /> xlabel('time(second)->');<br /> ylabel('amplitude');<br /> title('**fsk modulated signal**')<br /> end<br /> end<br />RESULT (Experiment no.=15)<br />enter the value of carrier angular frequency=5<br />enter the value of carrier amplitude=4<br />enter the number of input data=10<br />Experiment no.=16<br />Generation of Phase Shift Keying<br />clc<br />clf<br />clear all<br />fc=input('enter the value of carrier frequency=');<br />A=input('enter the value of carrier amplitude=');<br />n=input('enter the number of input data=');<br />x=rand(1,n);<br />%converting the signal(random num)into bipolar form<br />for i=1:10<br /> if(x(i)<0.5)<br /> y(i)=-1;<br /> else y(i)=1;<br /> end<br />end<br />%plotting the input signal<br />subplot(3,1,1);<br />stairs(y);<br />axis([1 10 -2 2])<br />title('**input signal**');<br />%plotting the carrier signal<br /> t=1:0.01:10;<br /> c=A*cos(2*pi*fc*t);<br /> subplot(3,1,2);<br /> plot(t,c);<br /> xlabel('time->');<br /> ylabel('amplitude->');<br /> title('**carrier signal**');<br /> % plotting the psk signal<br /> subplot(3,1,3);<br /> for t=1:10<br /> for i = t:.01:t+1<br /> s=4*y(t)*(cos(2*pi*fc*i));<br /> plot(i,s);<br /> xlabel('time->');<br /> ylabel('amplitude');<br /> title('**psk modulated signal**');<br /> hold on;<br /> end<br /> end<br /> <br />RESULT (Experiment no.=16)<br />enter the value of carrier frequency=5<br />enter the value of carrier amplitude=4<br />enter the number of input data=10<br />