<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nishthapandey on Medium]]></title>
        <description><![CDATA[Stories by Nishthapandey on Medium]]></description>
        <link>https://medium.com/@nishthapandey101?source=rss-0d14cc8f0e89------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_i45IqKYOU1XhHsb</url>
            <title>Stories by Nishthapandey on Medium</title>
            <link>https://medium.com/@nishthapandey101?source=rss-0d14cc8f0e89------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:30:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nishthapandey101/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Probability]]></title>
            <link>https://medium.com/@nishthapandey101/probability-93ffd5d81797?source=rss-0d14cc8f0e89------2</link>
            <guid isPermaLink="false">https://medium.com/p/93ffd5d81797</guid>
            <dc:creator><![CDATA[Nishthapandey]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 16:22:20 GMT</pubDate>
            <atom:updated>2024-03-12T16:22:20.850Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is probability? How it can be used in various fields?</strong></p><p><strong>Probability</strong> is a mathematical term which tells about an uncertainty of an event helps us to make predictions based on the information. It is expressed as a number between 0 and 1, where 0 indicates impossibility (the event will not occur) and 1 indicates certainty (the event will occur).</p><p>In various fields, probability is used extensively:</p><ol><li><strong>Statistics</strong>: Probability forms a foundation os statistical analysis, where it’s used to make inferences about population based on sample data.</li><li><strong>Finance</strong>: Probability models are used in finance to access the risk associated with investments, price derivatives, and predict market movements.</li><li><strong>Engineering and Science</strong>: Probability is used in engineering to analyze the reliability of systems, such as electrical circuits, mechanical components, and software systems. In science, probability is used in fields such as physics, biology, and environmental science to model random phenomena, such as radioactive decay, genetic mutations, and weather patterns.</li><li><strong>Machine Learning and Data Science</strong>: Probability is essential in machine learning and data science for modeling uncertainty in data, making predictions, and estimating parameters of statistical models. Techniques such as Bayesian inference and probabilistic graphical models rely heavily on probability theory.</li><li><strong>Operations Research and Management</strong>: Probability is used in operations research to model and analyze stochastic processes, such as queuing systems, inventory management, and production scheduling. In management, probability is used in decision analysis and risk management to assess the likelihood of different outcomes and make optimal decisions under uncertainty.</li><li><strong>Medicine and Healthcare</strong>: Probability is used in medical research to analyze clinical trial data, assess the effectiveness of treatments, and predict the probability of disease occurrence. In healthcare, probability is used in epidemiology to model the spread of infectious diseases and assess the effectiveness of public health interventions.</li><li><strong>Insurance</strong>: Insurance companies use probability to calculate premiums based on the likelihood of various events such as accidents, illnesses, or natural disasters occurring.</li><li><strong>Weather Forecasting</strong>: Meteorologists use probability to predict the likelihood of different weather outcomes, such as rain, snow, or sunshine.</li><li><strong>Gaming and Gambling</strong>: Probability plays a crucial role in games of chance like poker, blackjack, and roulette, helping players make decisions based on the likelihood of certain outcomes.</li></ol><p>Overall, probability plays a crucial role in a wide range of fields, providing a framework for understanding and dealing with uncertainty, making informed decisions, and solving complex problems.</p><p>After knowing this much about probability we need to understand few more terms:</p><p><strong>Experiment</strong>: Experiment is nothing but a process to generate an outcome or set of outcomes. these outcomes are generally random and uncertain. we experiment and get these outcomes for analysing and calculation the probability.</p><p><strong>Event</strong>: An event is consisting of an outcome or outcomes. For example tossing a coin is an event, rolling a dice is an event, rolling 2 dice is a set of outcomes.</p><p><strong>Sample Space</strong>: The set which consists all the possible outcomes of the event is called Sample Space, it is usually denoted by S. For example if tossing a fair coin is an event then the sample space would be, S = {H,T}.</p><h3>Comparison and contrast between Theoretical and Empirical Probability:</h3><ul><li><strong>Empirical Probability</strong>:</li></ul><p>1. Definition: Empirical probability, also known as experimental probability, is based on observations or experiments. It is calculated by conducting repeated trials of an experiment and recording the outcomes. The empirical probability of an event is the ratio of the number of times the event occurs to the total number of trials.</p><p>2. Calculation: Empirical probability is calculated using observed data from real-world experiments or observations. It is an estimate of the true underlying probability based on observed frequencies.</p><p>3. Use: Empirical probability is often used when it is not possible to determine the theoretical probabilities analytically or when dealing with situations where theoretical probabilities may not accurately represent real-world outcomes.</p><p><strong>Theoretical Probability</strong>:</p><p>1. Definition: Theoretical probability is based on mathematical principles and is calculated using theoretical considerations rather than empirical observations. It is determined by analyzing the sample space and the properties of the experiment.</p><p>2. Calculation: Theoretical probability is calculated using mathematical formulas and principles. It is based on the assumption of equally likely outcomes and does not require conducting actual experiments.</p><p>3. Use: Theoretical probability is used in situations where the sample space and the probabilities of outcomes are known or can be determined analytically. It provides a precise and exact measure of the likelihood of events occurring.</p><p>Comparison:</p><p>- Both empirical and theoretical probabilities are measures of the likelihood of events occurring.<br>- Empirical probability is based on observed frequencies from experiments, while theoretical probability is based on mathematical analysis of the sample space and the properties of the experiment.<br>- Empirical probability provides an estimate of the true underlying probability based on observed data, while theoretical probability provides an exact measure based on mathematical principles.</p><p>Contrast:</p><p>- Empirical probability is based on observed data and is subject to variability due to random fluctuations in the data, while theoretical probability is based on mathematical principles and is not affected by variability in observed data.<br>- Empirical probability may not always accurately represent the true underlying probabilities, especially with a small number of trials, while theoretical probability provides precise measures based on mathematical analysis.</p><p>Law of Large Numbers:</p><p>The Law of Large Numbers states that as the number of trials in an experiment increases, the empirical probability of an event approaches its theoretical probability. In other words, with a large enough sample size, the observed frequencies in empirical probability tend to converge to the true underlying probabilities in theoretical probability. This connection between empirical and theoretical probabilities provided by the Law of Large Numbers highlights the convergence of observed data to expected values as the sample size increases, reinforcing the reliability of probability estimates based on large datasets.</p><h3>What is random variable?</h3><p>A random variable is a mathematical concept used in probability theory and statistics to represent numerical outcomes of random phenomena. It assigns a numerical value to each outcome of an experiment, where each value corresponds to a possible outcome of the experiment.</p><p>Random variables can be classified into two main types: discrete random variables and continuous random variables.</p><p>1. <strong>Discrete Random Variable</strong>: A discrete random variable is one that can take on a finite or countably infinite number of distinct values. These values are typically integers or whole numbers. Examples of discrete random variables include the number of heads obtained when flipping a coin, the number of defects in a batch of products, or the number of students who pass an exam.</p><p>2. <strong>Continuous Random Variable</strong>: A continuous random variable is one that can take on any value within a specified range. These values are typically real numbers and can be infinitely divisible. Examples of continuous random variables include the height of a person, the temperature at a given location, or the time it takes for a process to complete.</p><p>The significance of random variables lies in their ability to represent and quantify uncertainty in various situations. By defining and studying random variables, we can analyze the probabilities associated with different outcomes of random experiments, make predictions, and infer properties of the underlying probability distributions.</p><p>Example:</p><p>Consider a random experiment of rolling a fair six-sided die. Let’s define a discrete random variable X that represents the outcome of this experiment, where X can take values from 1 to 6, each representing the number that appears on the face of the die.</p><p>The probability distribution of the random variable X is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*XzQucwNhiFK4c6fpatbcuA.png" /></figure><p>This means that each outcome has an equal probability of 1/6 of occurring when the die is rolled.</p><p>With this random variable X, we can calculate various probabilities associated with different outcomes. For example, we can calculate the probability of rolling a number greater than 4 as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*5U7wPgzow8HwFwvG2EanSg.png" /></figure><p>Thus, random variables allow us to analyze the probabilistic behaviour of random experiments and make informed decisions based on their outcomes.</p><p><strong>Axioms of probability</strong>: The axioms of probability are fundamental principles that govern the behaviour of probabilities in a probabilistic framework. These axioms were first formally introduced by mathematician Andrey Kolmogorov and are considered the foundation of probability theory. There are three main axioms:</p><p>1. <strong>Non-Negativity</strong>: The probability of any event A is a non-negative real number. Mathematically, this can be expressed as:<br> P(A) ≥ 0 <br> This axiom ensures that probabilities are always non-negative values.</p><p>2. <strong>Normalization</strong>: The probability of the entire sample space S is equal to 1. Mathematically, this can be expressed as:<br> P(S) = 1 <br> This axiom ensures that the total probability of all possible outcomes in the sample space is 1, representing certainty.</p><p>3. <strong>Additivity</strong>: For any two mutually exclusive (disjoint) events A and B (i.e., events that cannot occur simultaneously), the probability of the union of these events is equal to the sum of their individual probabilities. Mathematically, this can be expressed as:<br> P(A \cup B) = P(A) + P(B)<br> This axiom ensures that the probability of the union of disjoint events is the sum of their individual probabilities.</p><p>These three axioms provide the mathematical foundation for the definition and calculation of probabilities in probability theory. They ensure that probabilities behave consistently and follow certain rules, allowing for meaningful interpretations and applications in various fields.</p><p>Explanation of following with example:</p><p>1. <strong>Dependent Events</strong>:</p><p>Dependent events are events where the outcome of one event affects the outcome of another event. The probability of the second event is influenced by the outcome of the first event.</p><p>Example: Drawing two cards from a deck without replacement.</p><p>Suppose we have a standard deck of 52 playing cards. If we draw one card from the deck and do not replace it, the probability of the second card being of a certain type will change.</p><p>Let event A be drawing a red card on the first draw, and event B be drawing a red card on the second draw.</p><p>P(A) = 26/52= 1/2</p><p>Now, if the first card drawn is red (event A occurs), there will be 25 red cards left in the deck of 51 cards for the second draw:</p><p>P(B|A) = 25/51</p><p>Since the second draw’s probability depends on the outcome of the first draw, events A and B are dependent.</p><p>2. <strong>Independent Events</strong>:</p><p>Independent events are events where the outcome of one event does not affect the outcome of another event.</p><p>Example: Flipping a coin twice.</p><p>Let event A be getting heads on the first flip, and event B be getting heads on the second flip.</p><p>P(A) = P(B) = 1/2</p><p>Since the outcome of the first flip does not affect the outcome of the second flip, events A and B are independent.</p><p>3. <strong>Mutually Exclusive Events</strong>:</p><p>Mutually exclusive events are events that cannot occur simultaneously.</p><p>Example: Rolling a die and getting an odd number or getting an even number.</p><p>Let event A be getting an odd number, and event B be getting an even number.</p><p>P(A) = 3/6 = 1/2<br>P(B) = 3/6= 1/2</p><p>Since an outcome cannot be both odd and even, events A and B are mutually exclusive.</p><p>4. <strong>Conditional Probability</strong>:</p><p>Conditional probability is the probability of an event occurring given that another event has already occurred.</p><p>Example: Drawing a red card from a standard deck of playing cards, given that the card drawn is a face card (jack, queen, or king).</p><p>Let event A be drawing a red card, and event B be drawing a face card.</p><p>P(B) = 12/52 = 3/13<br> P(A|B) = 6/12 = 1/2</p><p>The probability of drawing a red card given that the card drawn is a face card is 1/2.</p><p>5. <strong>Joint Probability:</strong></p><p>Joint probability is the probability of two or more events occurring simultaneously.</p><p>Example: Tossing two coins and getting heads on both.</p><p>Let event A be getting heads on the first coin toss, and event B be getting heads on the second coin toss.</p><p>P(A \cap B) = P(A) * P(B) = (1/2)*(1/2) = 1/4</p><p>The joint probability of getting heads on both coin tosses is 1/4.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93ffd5d81797" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to python | data types in python]]></title>
            <link>https://medium.com/@nishthapandey101/introduction-to-python-data-types-in-python-79a4f70926a8?source=rss-0d14cc8f0e89------2</link>
            <guid isPermaLink="false">https://medium.com/p/79a4f70926a8</guid>
            <category><![CDATA[data-types-in-python]]></category>
            <dc:creator><![CDATA[Nishthapandey]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 06:10:14 GMT</pubDate>
            <atom:updated>2023-10-12T06:10:14.827Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong> : Python is a general purpose programming language , which is easy to understand and learn. Python is a widely used in programming and development area. In this blog data types in python are discussed.</p><p>Here is the summary of the six standard data types in python:</p><ul><li><strong>Numeric</strong>: This data type includes numbers like integers, floats and complex numbers and binary numbers.</li><li><strong>String</strong>: This data type represents a sequence of the characters. It has order and index. String always represented in ‘,”,’” . It is immutable data type.</li><li><strong>Lists</strong>: Lists are heterogeneous and mutable data type. Lists comes in sequence and enclosed in [ ]. This data type is dynamic.</li><li><strong>Tuples</strong>: This data type is heterogeneous but not mutable i.e. can’t be deleted or edited. This enclosed in ( ).</li><li><strong>Sets</strong>: Set considers same data as one quantity i.e. no duplicate only unique. It is unordered, heterogeneous and mutable.</li><li><strong>Dictionary</strong>: This data type has key and its values. It is mutable. It is enclosed in { }.</li></ul><p>Apart from this we can differentiate data type in two categories i.e. <strong>Mutable</strong> and <strong>Immutable</strong> .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79a4f70926a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>