<?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 Shaikfarah on Medium]]></title>
        <description><![CDATA[Stories by Shaikfarah on Medium]]></description>
        <link>https://medium.com/@shaikfarah118?source=rss-d7616954bbeb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BCSltmDic-ngDaOF</url>
            <title>Stories by Shaikfarah on Medium</title>
            <link>https://medium.com/@shaikfarah118?source=rss-d7616954bbeb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 18:22:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shaikfarah118/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[Descriptive Statistics in Exploratory Data Analysis (EDA)]]></title>
            <link>https://medium.com/@shaikfarah118/descriptive-statistics-in-exploratory-data-analysis-eda-91dc782ec8b6?source=rss-d7616954bbeb------2</link>
            <guid isPermaLink="false">https://medium.com/p/91dc782ec8b6</guid>
            <dc:creator><![CDATA[Shaikfarah]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 11:31:00 GMT</pubDate>
            <atom:updated>2026-07-28T11:31:00.818Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Exploratory Data Analysis (EDA) is the process of examining, cleaning, and understanding a dataset before applying statistical models or machine learning algorithms. The primary objective of EDA is to discover patterns, identify anomalies, detect missing values, and understand the relationships among variables.</p><p>Descriptive statistics forms the foundation of EDA by summarizing the key characteristics of a dataset using numerical measures and graphical representations. It provides a quick overview of the data, helping analysts make informed decisions during data preprocessing and model building.</p><p>The main categories of descriptive statistics are:</p><ol><li>Measures of Central Tendency</li><li>Measures of Dispersion</li><li>Measures of Position</li><li>Measures of Relationship</li></ol><h3>Measures of Central Tendency</h3><p>Measures of Central Tendency are statistical measures that identify the central or typical value of a dataset. They summarize a large set of data into a single representative value, making it easier to understand and compare datasets. In descriptive statistics and Exploratory Data Analysis (EDA), these measures help describe the overall distribution of data.</p><h3>Mean</h3><p>The <strong>mean</strong> is a measure of central tendency obtained by dividing the sum of all observations by the total number of observations. It represents the average value of a dataset and is widely used to summarize numerical data.</p><h4>Types of Mean</h4><p><strong>1. Arithmetic Mean (AM)</strong><br>The arithmetic mean is the most commonly used type of mean. It is calculated by adding all observations and dividing the total by the number of observations.</p><p><strong>Example:</strong><br>Data: 10, 20, 30, 40, 50</p><p>Arithmetic Mean = (10 + 20 + 30 + 40 + 50) / 5 = <strong>30</strong></p><p><strong>2. Geometric Mean (GM)</strong></p><p>The geometric mean is the nth root of the product of all observations. It is mainly used for growth rates, financial returns, and percentage changes.</p><p><strong>Example:</strong><br>Data: 2, 8</p><p>Geometric Mean = √(2 × 8) = √16 = <strong>4</strong></p><p><strong>3. Harmonic Mean (HM)</strong></p><p>The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the observations. It is useful for calculating average rates, such as speed and price per unit.</p><p><strong>Example:</strong><br>A car travels equal distances at 40 km/h and 60 km/h.</p><p>Harmonic Mean = 2 / (1/40 + 1/60) = <strong>48 km/h</strong></p><p><strong>Applications of Mean</strong></p><ul><li>Arithmetic Mean: Average marks, income, height, and weight.</li><li>Geometric Mean: Population growth, investment returns, and compound growth.</li><li>Harmonic Mean: Average speed, ratios, and rates.</li></ul><p><strong>Relationship among Means</strong></p><p>For any set of positive observations:</p><p><strong>Arithmetic Mean ≥ Geometric Mean ≥ Harmonic Mean (AM ≥ GM ≥ HM)</strong></p><p>Equality holds only when all observations are equal.</p><h3>Median</h3><p>The <strong>median</strong> is the middle value of a dataset when the observations are arranged in ascending or descending order. It divides the dataset into two equal halves and is less affected by extreme values (outliers).</p><p><strong>Example:</strong></p><p>Data: 12, 18, 25, 30, 45</p><p>Median = <strong>25</strong></p><p>For an even number of observations:</p><p>Data: 10, 20, 30, 40</p><p>Median = (20 + 30) / 2 = <strong>25</strong></p><h3>Mode</h3><p>The <strong>mode</strong> is the value that occurs most frequently in a dataset. It represents the observation with the highest frequency and can be used for both numerical and categorical data.</p><p><strong>Example:</strong></p><p>Data: 5, 7, 8, 8, 9, 10</p><p>Mode = <strong>8</strong></p><p>Another example:</p><p>Data: Red, Blue, Blue, Green, Blue</p><p>Mode = <strong>Blue</strong></p><h3>Measures of Dispersion</h3><p>Measures of Dispersion are statistical measures that describe the extent to which data values are spread around the central value. While measures of central tendency indicate the typical value of a dataset, measures of dispersion indicate the variability or consistency of the data. A smaller dispersion indicates that the data points are closely clustered around the mean, whereas a larger dispersion indicates greater variability.</p><h3><strong>The main measures of dispersion are:</strong></h3><h3>1. Range</h3><p>The <strong>range</strong> is the simplest measure of dispersion. It is defined as the difference between the maximum and minimum values in a dataset.</p><p><strong>Formula:</strong></p><p>Range = Maximum Value − Minimum Value</p><p><strong>Example:</strong></p><p>Data: 12, 18, 25, 30, 45</p><p>Range = 45 − 12 = <strong>33</strong></p><h3>2. Variance</h3><p>The <strong>variance</strong> measures the average squared deviation of each observation from the mean. A higher variance indicates greater variability in the dataset.</p><p><strong>Example:</strong></p><p>Data: 2, 4, 6, 8, 10</p><p>Mean = 6</p><p>Variance = <strong>8</strong></p><h3>3. Standard Deviation</h3><p>The <strong>standard deviation</strong> is the positive square root of the variance. It measures the average spread of data values around the mean and is expressed in the same unit as the original data.</p><p><strong>Example:</strong></p><p>For the data 2, 4, 6, 8, 10</p><p>Standard Deviation = √8 ≈ <strong>2.83</strong></p><h3>4. Interquartile Range (IQR)</h3><p>The <strong>Interquartile Range (IQR)</strong> measures the spread of the middle 50% of the data. It is calculated as the difference between the third quartile (Q3) and the first quartile (Q1).</p><p><strong>Formula:</strong></p><p>IQR = Q3 − Q1</p><p><strong>Example:</strong></p><p>Q1 = 20, Q3 = 40</p><p>IQR = 40 − 20 = <strong>20</strong></p><h3>5. Mean Deviation</h3><p>The <strong>Mean Deviation (MD)</strong> is a measure of dispersion that shows the average distance of all observations from a central value (usually the mean or median). It is calculated using the absolute differences, so negative signs are ignored.</p><p><strong>Formula:</strong></p><p><strong>Mean Deviation = Σ|x − Mean| / n</strong></p><p>where:</p><ul><li><strong>x</strong> = each observation</li><li><strong>Mean</strong> = arithmetic mean</li><li><strong>n</strong> = total number of observations</li></ul><p><strong>Example:</strong></p><p>Data: 2, 4, 6, 8, 10</p><p>Mean = 6</p><p>Absolute deviations = 4, 2, 0, 2, 4</p><p>Mean Deviation = (4 + 2 + 0 + 2 + 4) / 5 = <strong>2.4</strong></p><h3>Measures of Position</h3><p>Measures of Position indicate the relative location or rank of an observation within a dataset. They divide the data into equal parts and help compare the position of individual values.</p><h3>1. Quartiles</h3><p>Quartiles divide an ordered dataset into <strong>four equal parts</strong>.</p><ul><li><strong>Q1 (First Quartile):</strong> 25% of the observations lie below this value.</li><li><strong>Q2 (Second Quartile):</strong> The median or 50th percentile.</li><li><strong>Q3 (Third Quartile):</strong> 75% of the observations lie below this value.</li></ul><p><strong>Example:</strong></p><p>Data: 10, 20, 30, 40, 50, 60, 70, 80</p><ul><li>Q1 = 25</li><li>Q2 = 45</li><li>Q3 = 65</li></ul><h3>2. Deciles</h3><p>Deciles divide a dataset into <strong>ten equal parts</strong>. They are represented as D₁, D₂, …, D₉.</p><p><strong>Example:</strong></p><p>If a student is in the <strong>8th decile (D₈)</strong>, they have scored higher than approximately <strong>80%</strong> of the students.</p><h3>3. Percentiles</h3><p>Percentiles divide a dataset into <strong>100 equal parts</strong>. They are commonly used in examinations and standardized tests.</p><p><strong>Example:</strong></p><p>If a student is at the <strong>90th percentile</strong>, it means they scored higher than <strong>90%</strong> of the students.</p><h3>Measures of Shape</h3><p>Measures of Shape describe the distribution of data and indicate whether it is symmetrical or has extreme values.</p><h3>1. Skewness</h3><p>Skewness measures the <strong>asymmetry</strong> of a data distribution.</p><ul><li><strong>Positive Skew (Right-Skewed):</strong> The tail extends to the right.<br><strong>Example:</strong> Income distribution, where a few individuals earn very high incomes.</li><li><strong>Negative Skew (Left-Skewed):</strong> The tail extends to the left.<br><strong>Example:</strong> An easy exam where most students score high and only a few score very low.</li><li><strong>Zero Skew:</strong> The distribution is perfectly symmetrical.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*ZNK9FyrZo50jvIg1ge98WA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*n4F1FgQ6Euwmma5D2UeDzQ.jpeg" /></figure><h3>2. Kurtosis</h3><p>Kurtosis measures the <strong>peakedness</strong> and <strong>tail heaviness</strong> of a distribution.</p><ul><li><strong>Leptokurtic:</strong> High peak with heavy tails; more extreme values (outliers).</li><li><strong>Mesokurtic:</strong> Normal distribution with moderate peak and tails.</li><li><strong>Platykurtic:</strong> Flatter peak with light tails; fewer extreme values.</li></ul><p><strong>Example:</strong></p><ul><li>Daily stock market returns often show <strong>leptokurtic</strong> behavior due to occasional extreme price changes.</li><li>Human heights generally follow a <strong>mesokurtic</strong> (approximately normal) distribution.</li><li>Uniformly distributed data is often <strong>platykurtic</strong>, with a flatter shape.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ny4cpFwVr9jMp43CZIJEsQ.jpeg" /></figure><h3>Measures of Relationship</h3><p>Measures of Relationship are statistical measures used to determine the strength and direction of the relationship between two or more variables. They help identify whether changes in one variable are associated with changes in another variable. In Exploratory Data Analysis (EDA), these measures are useful for understanding variable relationships and selecting important features for analysis.</p><p>The two main measures of relationship are <strong>Covariance</strong> and <strong>Correlation</strong>.</p><h3>1. Covariance</h3><p>Covariance measures the direction of the relationship between two variables. It indicates whether the variables increase or decrease together.</p><ul><li><strong>Positive Covariance:</strong> Both variables increase or decrease together.</li><li><strong>Negative Covariance:</strong> One variable increases while the other decreases.</li><li><strong>Zero Covariance:</strong> No linear relationship exists between the variables.</li></ul><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*R_0pzqcxYPAwl-SjJNoSEA.png" /></figure><p>As the number of hours studied increases, marks also increase. Therefore, the covariance is <strong>positive</strong>.</p><h3>2. Correlation</h3><p>Correlation measures both the <strong>strength</strong> and <strong>direction</strong> of the linear relationship between two variables. The correlation coefficient (<strong>r</strong>) ranges from <strong>−1 to +1</strong>.</p><ul><li><strong>r = +1:</strong> Perfect positive correlation.</li><li><strong>r = 0:</strong> No linear correlation.</li><li><strong>r = −1:</strong> Perfect negative correlation.</li></ul><p><strong>Examples:</strong></p><ul><li><strong>Positive Correlation:</strong> As temperature increases, ice cream sales increase.</li><li><strong>Negative Correlation:</strong> As the price of a product increases, its demand decreases.</li><li><strong>Zero Correlation:</strong> Shoe size and intelligence have no meaningful relationship.</li></ul><h3><strong>Correlation coefficient interpretation table</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*gY_ZaKw2lxCJ6GqdsBP1Ng.jpeg" /></figure><h3>Applications of Measures of Relationship</h3><ul><li>Identify relationships between variables.</li><li>Select important features in EDA.</li><li>Detect positive and negative trends.</li><li>Support predictive modeling and machine learning.</li><li>Analyze business, financial, and scientific data.</li></ul><h3>Advantages of Descriptive Statistics</h3><p>Descriptive statistics offers several benefits in data analysis and Exploratory Data Analysis (EDA). Some of the key advantages are:</p><ul><li>Summarizes large datasets into simple and meaningful information.</li><li>Makes data easier to understand and interpret.</li><li>Helps identify patterns, trends, and data distribution.</li><li>Detects outliers, missing values, and inconsistencies in the data.</li><li>Supports effective decision-making by providing meaningful insights.</li><li>Serves as the foundation for inferential statistics, machine learning, and predictive analysis.</li><li>Facilitates easy comparison between different datasets.</li></ul><h3>Limitations of Descriptive Statistics</h3><p>Despite its usefulness, descriptive statistics has certain limitations:</p><ul><li>It only describes the collected data and does not make predictions about future outcomes.</li><li>It cannot establish cause-and-effect relationships between variables.</li><li>Some measures, such as the mean, are affected by extreme values (outliers).</li><li>It does not explain the reasons behind observed patterns or trends.</li><li>The results are limited to the dataset being analyzed and cannot be generalized to a larger population without inferential statistics.</li></ul><h3>Conclusion</h3><p>Descriptive statistics is a fundamental component of Exploratory Data Analysis (EDA) that helps summarize, organize, and interpret data effectively. By using measures of central tendency, dispersion, position, shape, and relationship, it provides a clear understanding of the characteristics and distribution of a dataset. These statistical measures enable analysts and researchers to identify patterns, detect outliers, compare datasets, and make informed decisions. As the first step in data analysis, descriptive statistics lays the foundation for inferential statistics, predictive modeling, and machine learning, making it an essential tool in research, business, healthcare, finance, and data science.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91dc782ec8b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conditional Statements in Python: Teaching Programs How to Make Decisions]]></title>
            <link>https://medium.com/@shaikfarah118/conditional-statements-in-python-teaching-programs-how-to-make-decisions-0ca6e70cc134?source=rss-d7616954bbeb------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ca6e70cc134</guid>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-if-else-statement]]></category>
            <category><![CDATA[conditional-statements]]></category>
            <category><![CDATA[nested-if-else]]></category>
            <dc:creator><![CDATA[Shaikfarah]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 08:41:20 GMT</pubDate>
            <atom:updated>2026-06-11T08:41:20.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*igFPVcgW5cz7XlS5GGP7JQ.png" /></figure><p>Imagine waking up in the morning and deciding what to wear. If it’s raining, you take an umbrella. If it’s sunny, you wear sunglasses. If it’s cold, you grab a jacket. Every day, we make decisions based on conditions.</p><p>Programming works in much the same way.</p><p>When developers write software, they often need programs to make decisions. Should a user be allowed to log in? Is a student eligible to pass an exam? Does a customer qualify for a discount? In Python, these decisions are handled using <strong>conditional statements</strong>.</p><p>Conditional statements are one of the most important building blocks of programming because they allow a program to think logically and respond differently to different situations.</p><h3>What Are Conditional Statements?</h3><p>A conditional statement is a programming construct that executes certain code only when a specific condition is met. Instead of following a fixed sequence of instructions, the program evaluates a condition and chooses an appropriate action.</p><p>For example, consider an online shopping website. If the total purchase amount exceeds a certain value, the customer may receive free shipping. If not, shipping charges are added. The program must evaluate the condition and make a decision.</p><p>Python provides several ways to implement this decision-making process, including if, if-else, and if-elif-else statements.</p><h3>The Role of the if Statement</h3><p>The simplest form of a conditional statement is the if statement. It tells Python to execute a block of code only when a condition evaluates to True.</p><p>For example, a program checking voting eligibility may verify whether a person’s age is 18 or older. If the condition is true, the program can display a message indicating that the person is eligible to vote.</p><p>This simple mechanism forms the foundation of decision-making in Python and is used extensively in real-world applications.</p><h3>Example 1. if Statement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*PiZO4EV8PCaEvagDHEVIQQ.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*VGpzZx7UcsUDnOrBpFgw5w.png" /></figure><h3>Making Choices with if-else</h3><p>Life rarely offers only one possible outcome. Often, there are two possibilities. If a condition is true, one action is taken; otherwise, a different action is performed.</p><p>This is where the if-else statement becomes useful.</p><p>Consider a banking application checking whether a user has sufficient funds for a withdrawal. If the account balance is enough, the transaction proceeds. Otherwise, the system displays an insufficient balance message.</p><p>The if-else structure enables programs to handle both outcomes efficiently, making applications more interactive and user-friendly.</p><h3>Example 2. else Statement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*9HTC3odG1IHGftUNqGGLug.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*TRJsT_-I37UFDmrAbugKvA.png" /></figure><h3>Handling Multiple Conditions (Nested if else)</h3><p>Many situations require more than two possible outcomes. For example, a grading system may assign different grades based on a student’s score.</p><p>A student scoring above 90 may receive Grade A, while scores between 70 and 89 receive Grade B. Lower scores may result in different grades or even a failing status.</p><p>Python addresses such scenarios using the if-elif-else structure. The elif keyword, which stands for &quot;else if,&quot; allows multiple conditions to be evaluated sequentially until one of them is satisfied.</p><p>This approach keeps code organized and easy to understand while handling complex decision-making scenarios.</p><h3>Example 3. Nested if statement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*g_2YuTarhawdnskrn2GTIA.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*BS8-_44EW9YWXaVWf8jxHg.png" /></figure><h3>Example 4. Nested else statement</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*NHhL7NCkUn4ZPk5y4xFPnQ.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*5LpnKcUudzC4vb7R5O04DA.png" /></figure><h3>The Importance of Logical Operators</h3><p>Conditional statements become even more powerful when combined with logical operators such as and, or, and not.</p><p>Suppose a university requires students to have both sufficient attendance and passing marks to qualify for an examination. In such a case, the program must verify multiple conditions simultaneously.</p><p>Logical operators make it possible to combine conditions and create sophisticated decision-making processes. They are commonly used in authentication systems, eligibility checks, recommendation engines, and many other software applications.</p><h3>Example 5. Logical Opertors with statements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*oFceD1Kwg_ncXc1f3dcVWA.png" /></figure><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*K51PcAN8xoe3qPqQUptTqg.png" /></figure><h3>How the Logical Operators Work</h3><ul><li><strong>and</strong> → All conditions connected by and must be True.</li><li><strong>or</strong> → At least one of the conditions connected by or must be True.</li><li><strong>not</strong> → Reverses the condition. The not operator simply changes <strong>True to False</strong> and <strong>False to True</strong>. In this example, it excludes the number 12 even though it satisfies the other conditions.</li></ul><h3>Real-World Applications of Conditional Statements</h3><p>Conditional statements are everywhere in modern software.</p><p>Social media platforms use them to determine which content appears in a user’s feed. E-commerce websites use them to recommend products based on browsing history. Banking systems rely on them to validate transactions and detect unusual activity.</p><p>Even simple applications such as calculators, games, and weather apps depend heavily on conditional logic. Without conditional statements, programs would be unable to adapt to changing situations or user input.</p><h3>Example: Event Entry System</h3><p>A person can enter the event only if:</p><ul><li>They are <strong>18 years or older</strong> (and)</li><li>They have either a <strong>ticket or a VIP pass</strong> (or)</li><li>They are <strong>not blacklisted</strong> (not)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*Hn5to2x2RHHPd7iy1FG3zw.png" /></figure><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*6ZzXvM5UjvaTrKCgY7aKng.png" /></figure><h3>Common Challenges for Beginners</h3><p>While learning conditional statements, beginners often encounter a few common mistakes.</p><p>One frequent error is forgetting the colon (:) after an if statement. Another is incorrect indentation, which is particularly important in Python because indentation defines code blocks. Beginners may also confuse the assignment operator (=) with the comparison operator (==).</p><p>Although these mistakes are common, they become easier to avoid with practice and careful attention to syntax.</p><h3>Why Every Python Programmer Should Master Conditional Statements</h3><p>Conditional statements are more than just a programming feature — they represent the logic that drives software behavior. They transform static code into dynamic programs capable of responding intelligently to different circumstances.</p><p>Whether you’re developing a simple student management system or a large-scale web application, conditional statements will play a crucial role in your code. Mastering them early creates a strong foundation for learning more advanced topics such as loops, functions, object-oriented programming, and algorithms.</p><h3>Conclusion</h3><p>Conditional statements are the decision-making engine of Python programming. They enable applications to evaluate conditions, choose actions, and respond appropriately to different situations. From login systems and grading applications to e-commerce platforms and artificial intelligence systems, conditional logic is everywhere.</p><p>For beginners, understanding conditional statements is an essential step toward becoming a confident Python programmer. Once you learn how to use conditions effectively, you’ll be able to create programs that are not only functional but also intelligent and responsive.</p><p>In the world of programming, every smart decision begins with a simple condition.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ca6e70cc134" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>