0% found this document useful (0 votes)
9 views

Mathematical Foundation of Computer Science - notes

The document outlines the mathematical foundation of computer science, covering topics such as probability, random variables, sampling theory, hypothesis testing, algebraic structures, number theory, and graph theory. It includes definitions, theorems, and examples related to each topic, along with practical problems and their solutions. The content is structured into five units, each focusing on different aspects of mathematics relevant to computer science.

Uploaded by

caleb dharmaraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Mathematical Foundation of Computer Science - notes

The document outlines the mathematical foundation of computer science, covering topics such as probability, random variables, sampling theory, hypothesis testing, algebraic structures, number theory, and graph theory. It includes definitions, theorems, and examples related to each topic, along with practical problems and their solutions. The content is structured into five units, each focusing on different aspects of mathematics relevant to computer science.

Uploaded by

caleb dharmaraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Mathematical Foundation of Computer Science

UNIT I: Basic Probability and Random Variables: Random Experiments, Sample Spaces Events, the

Concept of Probability the Axioms of Probability, Some Important Theorems on Probability


Assignment of Probabilities, Conditional Probability Theorems on Conditional Probability,
Independent Events, Bayes Theorem or Rule. Random Variables, Discrete Probability Distributions,
Distribution Functions for Random Variables, Distribution Functions for Discrete Random Variables,
Continuous Random

Variables

UNIT II: Sampling and Estimation Theory: Population and Sample, Statistical Inference Sampling

With and Without Replacement Random Samples, Random Numbers Population Parameters Sample

Statistics Sampling Distributions, Frequency Distributions, Relative Frequency Distributions,

Computation of Mean, Variance, and Moments for Grouped Data. Unbiased Estimates and Efficient

Estimates Point Estimates and Interval Estimates. Reliability Confidence Interval Estimates of
Population Parameters, Maximum Likelihood Estimates

UNIT III: Tests of Hypothesis and Significance: Statistical Decisions Statistical Hypotheses. Null

Hypotheses Tests of Hypotheses and Significance Type I and Type II Errors Level of Significance Tests

Involving the Normal Distribution One-Tailed and Two-Tailed Tests P Value Special Tests of

Significance for Large Samples Special Tests of Significance for Small Samples Relationship between

Estimation Theory and Hypothesis Testing Operating Characteristic Curves. Power of a Test Quality

Control Charts Fitting Theoretical Distributions to Sample Frequency Distributions, The Chi-Square
Test

for Goodness of Fit Contingency Tables Yates’ Correction for Continuity Coefficient of Contingency.

UNIT IV: Algebraic Structures and Number Theory: Algebraic Systems, Examples, General

Properties, Semi Groups and Monoids, Homomorphism of Semi Groups and Monoids, Group,
Subgroup, Abelian Group, Homomorphism, Isomorphism. Properties of Integers, Division Theorem,
The Greatest Common Divisor, Euclidean Algorithm, Least Common Multiple, Testing for Prime
Numbers, The Fundamental Theorem of Arithmetic, Modular Arithmetic (Fermat’s Theorem and
Euler’s Theorem)

UNIT V: Graph Theory: Basic Concepts of Graphs, Sub graphs, Matrix Representation of Graphs:

Adjacency Matrices, Incidence Matrices, Isomorphic Graphs, Paths and Circuits, Eulerian and

Hamiltonian Graphs, Multigraphs, Planar Graphs, Euler’s Formula, Graph Colouring and Covering,

Chromatic Number, Spanning Trees, Algorithms for Spanning Trees (Problems Only and Theorems

without Proofs).
Solutions to Probability and Random Variables
Questions
1(a) What is Conditional Probability? Discuss various
theorems of conditional probability in brief.
Definition: Conditional probability is the probability of an event A occurring given that another event
B has already occurred. It is denoted by P(A|B) and is given by the formula:

P(A|B) = P(A ∩ B) / P(B), where P(B) > 0

Theorems of Conditional Probability:

1. 1. Multiplication Rule: P(A ∩ B) = P(A|B) * P(B) = P(B|A) * P(A)


2. 2. Chain Rule: For n events A1, A2, ..., An, P(A1 ∩ A2 ∩ ... ∩ An) = P(A1) * P(A2|A1) * P(A3|A1 ∩
A2) ... P(An|A1 ∩ ... ∩ An-1)
3. 3. Law of Total Probability: If B1, B2, ..., Bn are mutually exclusive and exhaustive events, then
P(A) = Σ P(A|Bi) * P(Bi)

1(b) Explain Bayes Theorem. Solve the given problem.


Bayes Theorem Formula: P(A|B) = P(B|A) * P(A) / P(B)

Given Problem:

• Incidence rate of disease = P(D) = 0.02


• False negative rate = P(¬T|D) = 0.10 → P(T|D) = 0.90
• False positive rate = P(T|¬D) = 0.01
• Probability of no disease = P(¬D) = 1 - P(D) = 0.98

We need P(D|T): Probability that a person has the disease given a positive test result.

Using Bayes Theorem: P(D|T) = [P(T|D) * P(D)] / P(T)

First, calculate P(T): P(T) = P(T|D) * P(D) + P(T|¬D) * P(¬D)

P(T) = (0.90 * 0.02) + (0.01 * 0.98) = 0.018 + 0.0098 = 0.0278

Now, calculate P(D|T): P(D|T) = (0.90 * 0.02) / 0.0278 ≈ 0.647

Answer: The probability that a person who tests positive actually has the disease is approximately
64.7%.

2(a) What is a Distribution Function? Provide examples for


random variables.
Definition: A distribution function F(x) gives the cumulative probability of a random variable X taking
a value less than or equal to x:

F(x) = P(X ≤ x)

Types of Distribution Functions:

4. 1. Discrete Random Variables: If X is discrete, the distribution function is a step function.


Example: If X is the outcome of a die roll, P(X ≤ 3) = P(X = 1) + P(X = 2) + P(X = 3).
5. 2. Continuous Random Variables: If X is continuous, F(x) is a smooth curve. Example: For a
normal distribution, F(x) is the area under the curve to the left of x.

2(b) Solve the given problem.


Given Data:

• Ratios of selection: P(A:B:C) = 4:1:2 → P(A) = 4/7, P(B) = 1/7, P(C) = 2/7
• Probabilities of introducing changes:
- P(C|A) = 0.3
- P(C|B) = 0.8
- P(C|C) = 0.5

We need P(B|C): Probability that the change is due to B.

Using Bayes Theorem: P(B|C) = [P(C|B) * P(B)] / P(C)

First, calculate P(C): P(C) = P(C|A) * P(A) + P(C|B) * P(B) + P(C|C) * P(C)

P(C) = (0.3 * 4/7) + (0.8 * 1/7) + (0.5 * 2/7) = 1.2/7 + 0.8/7 + 1.0/7 = 3.0/7

Now, calculate P(B|C): P(B|C) = (0.8 * 1/7) / (3.0/7) = 0.8 / 3.0 ≈ 0.267

Answer: The probability that the change is due to B is approximately 26.7%.

You might also like