<?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 Sarika Sony on Medium]]></title>
        <description><![CDATA[Stories by Sarika Sony on Medium]]></description>
        <link>https://medium.com/@sarikasony845?source=rss-d169e80a9c8f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*189irlK2V1QYBpeE</url>
            <title>Stories by Sarika Sony on Medium</title>
            <link>https://medium.com/@sarikasony845?source=rss-d169e80a9c8f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 05:26:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarikasony845/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[Introduction to Generative AI & Prompt Engineering: My Learning Journey]]></title>
            <link>https://medium.com/@sarikasony845/introduction-to-generative-ai-prompt-engineering-my-learning-journey-7bc7a3a94b7e?source=rss-d169e80a9c8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bc7a3a94b7e</guid>
            <dc:creator><![CDATA[Sarika Sony]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 10:31:20 GMT</pubDate>
            <atom:updated>2026-08-04T10:31:20.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*JgNuHYGSMvyf44af" /></figure><h3>What is Generative AI?</h3><p>Generative AI is a branch of Artificial Intelligence that creates new content by learning patterns from large amounts of existing data.</p><p>Instead of only recognizing or classifying information, Generative AI generates:</p><ul><li>Text</li><li>Images</li><li>Videos</li><li>Music</li><li>Computer code</li><li>Audio</li><li>Synthetic data : It is artificially generated data that mimics the statistical properties of real-world data</li></ul><p>For example:</p><ul><li>ChatGPT writes articles.</li><li>Gemini answers complex questions.</li><li>DALL·E generates images from text.</li><li>GitHub Copilot writes code.</li><li>Suno creates music using prompts.</li></ul><p>Generative AI uses deep learning models, particularly Transformer architectures, to understand context and generate human-like outputs.</p><h3>Applications of Generative AI</h3><ol><li><strong>Content Creation</strong> — Generate articles, blogs, emails, and social media posts.</li><li><strong>Software Development</strong> — Write code, debug programs, and generate documentation.</li><li><strong>Education</strong> — Personalized tutoring, quizzes, and learning assistance.</li><li><strong>Healthcare</strong> — Medical reports, drug discovery, and patient support.</li><li><strong>Customer Support</strong> — AI chatbots and virtual assistants for 24/7 service.</li><li><strong>Design &amp; Media</strong> — Create images, videos, music, logos, and animations.</li><li><strong>Marketing &amp; Advertising</strong> — Generate ad copy, product descriptions, and SEO content.</li><li><strong>Business Productivity</strong> — Meeting summaries, report generation, and workflow automation.</li><li><strong>Finance</strong> — Financial analysis, report summarization, and fraud detection support.</li><li><strong>Research &amp; Data Analysis</strong> — Summarize research papers, analyze data, and extract insights.</li></ol><h3>Difference between Traditional AI and Generative AI</h3><p><strong>Traditional AI</strong> is designed to analyze existing data and make predictions or decisions. It focuses on tasks like classification, regression, recommendation systems, and fraud detection. For example, a spam filter classifies emails as spam or not spam, and a face recognition system identifies a person from an image.</p><p><strong>Generative AI</strong>, on the other hand, goes a step further by creating new content. Instead of only analyzing data, it can generate text, images, videos, music, or even code. For example, Chat GPT can write an article, DALL·E can generate images from text, and GitHub Copilot can suggest code.</p><p><strong>Traditional AI = Predicts and Classifies</strong><br> <strong>Generative AI = Creates and Generates</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*LArQugAR_WHjj_cN3lxhlQ.png" /></figure><h3>2. Large Language Models (LLMs)</h3><h3>What are LLMs?</h3><p>Large Language Models (LLMs) are deep learning models trained on massive collections of text from books, websites, articles, research papers, and publicly available datasets.</p><p>They learn relationships between words and predict the next most probable token, enabling them to generate coherent and context-aware responses.</p><p>Examples include: GPT models ,Gemini ,Llama ,Claude ,Mistral</p><h3>How do LLMs work?</h3><p>At a high level, LLMs work through the following process:</p><ol><li>Collect large amounts of text data.</li><li>Convert text into tokens.</li><li>Learn patterns using Transformer neural networks.</li><li>Predict the next token during training.</li><li>Minimize prediction errors using backpropagation and gradient descent.</li><li>Generate responses token by token during inference.</li></ol><p>Although LLMs appear to “understand” language, they actually predict the most probable next token based on learned patterns and context.</p><h3>Capabilities of LLMs</h3><p>Modern LLMs can perform many tasks:</p><p>Question answering ,Content generation, Translation, Summarization, Code generation, Sentiment analysis , Brainstorming ,Data analysis , Email drafting ,SQL query generation</p><p>These capabilities make LLMs highly versatile across industries.</p><h3>Real-World Use Cases</h3><p>Some practical applications include:</p><ul><li>AI customer support</li><li>Medical assistants</li><li>Legal document summarization</li><li>Resume optimization</li><li>Coding assistants</li><li>Financial report analysis</li><li>Educational tutors</li><li>Research assistants</li><li>Content creation</li><li>Business intelligence</li></ul><h3>LLM APIs</h3><p>An API (Application Programming Interface) allows developers to access LLMs through code instead of using web interfaces.</p><p>Popular APIs include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*mCsmnbU540NxNCBK.jpg" /></figure><h3>OpenAI API</h3><p>OpenAI provides APIs for GPT models, image generation, embeddings, speech processing, and more.</p><p>Common uses: Chatbots , AI assistants, Content generation , Coding tools.</p><h3>Gemini API</h3><p>Google’s Gemini API supports multimodal AI capable of processing text, images, audio, and video.</p><p>Common uses: Enterprise AI , Search applications , Research tools</p><h3>Groq API</h3><p>Groq offers extremely fast inference for open-source LLMs such as Llama.</p><p>Advantages include:</p><ul><li>Very low latency : Latency is the time delay between a user request and the system’s response.</li><li>Fast responses</li><li>Cost-effective inference</li></ul><h3>API Authentication</h3><p>Most LLM APIs require an API Key.</p><p>Example (Python):</p><pre>import os</pre><pre>api_key = os.getenv(&quot;OPENAI_API_KEY&quot;)</pre><h3>Best Practices</h3><ul><li>Never expose API keys publicly : Prevents unauthorized access and misuse.</li><li>Store keys in environment variables : Keeps keys secure and separate from code.</li><li>Rotate keys regularly : Minimizes risk if a key is compromised.</li><li>Restrict permissions where possible : Limits potential damage if a key is stolen.</li><li>Never commit keys to GitHub repositories : Prevents key leaks and unexpected API charges.</li></ul><h3>3 Prompt Engineering</h3><h3>What is Prompt Engineering?</h3><p>Prompt Engineering is the process of designing effective prompts that guide an AI model to produce accurate, relevant, and useful responses.</p><p>A well-crafted prompt often produces significantly better results than a vague one.</p><h3>Importance of Prompt Engineering</h3><p>Prompt Engineering helps to:</p><ul><li>Improve response quality</li><li>Reduce ambiguity</li><li>Obtain structured outputs</li><li>Increase consistency</li><li>Save time</li><li>Control AI behavior</li></ul><p>It is one of the most valuable skills when working with LLMs.</p><h3>Components of a Good Prompt</h3><p>A good prompt generally includes:</p><ul><li>Role</li><li>Task</li><li>Context</li><li>Constraints</li><li>Desired output format</li></ul><p>Example: <em>You are a Data Analyst. Analyze the sales data and summarize the top three insights in bullet points.</em></p><h3>User Prompt vs System Prompt</h3><p><strong>System Prompt</strong> is a high-priority instruction provided by the developer or application that defines the AI’s role, behavior, tone, and constraints.</p><p><strong>User Prompt</strong> is the instruction or question provided by the user to perform a specific task. The AI follows the system prompt while responding to the user prompt. For example, if the system prompt says “You are a friendly Python tutor,” and the user asks “Explain loops,” the AI explains loops in a friendly, beginner-friendly manner.</p><h3>Key Difference</h3><ul><li><strong>System Prompt → Defines <em>how</em> the AI should behave.</strong></li><li><strong>User Prompt → Defines <em>what</em> the AI should do.</strong></li></ul><h3>5. Prompting Techniques</h3><h3>Zero-Shot Prompting</h3><p>The model receives only the task.</p><p>Prompt: <em>Explain Machine Learning in simple terms.</em></p><h3>One-Shot Prompting</h3><p>The model receives one example before the task.</p><p>Prompt: <em>Example: Cat → Animal , Dog → ?</em></p><h3>Few-Shot Prompting</h3><p>The model receives multiple examples.</p><p>Prompt: <em>Positive → Great product , Negative → Poor quality ,Positive → Excellent service , Classify: “Delivery was delayed.”</em></p><h3>Chain of Thought (CoT)</h3><p>The model is encouraged to reason through the problem step by step before arriving at the final answer.</p><p>Useful for:</p><ul><li>Mathematics</li><li>Logical reasoning</li><li>Decision-making</li></ul><h3>Tree of Thoughts (ToT)</h3><p>Instead of following one reasoning path, the model explores multiple possible approaches before selecting the best solution.</p><p>Useful for:</p><ul><li>Planning</li><li>Complex decision making</li><li>Strategic reasoning</li></ul><h3>6. LLM Parameters</h3><h3>Temperature</h3><p>Controls creativity.</p><p>Low Temperature (0–0.3)</p><ul><li>Deterministic</li><li>Accurate</li><li>Less creative</li></ul><p>High Temperature (0.8–1.5)</p><ul><li>Creative</li><li>Diverse responses</li><li>More randomness</li></ul><h3>Top-p (Nucleus Sampling)</h3><p>Top-p limits the model to selecting from the smallest set of tokens whose cumulative probability reaches a threshold (for example, 0.9). This balances creativity while avoiding very unlikely words.</p><h3>Top-k Sampling</h3><p>Top-k restricts the model to choosing only from the top <em>k</em> most likely next tokens. Smaller values make responses more focused, while larger values increase diversity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*dOvbs4AxLP5T61Pv8iHk0A.png" /></figure><h3>7 . Hands-on Prompt Examples</h3><h3>Example 1 — Zero-Shot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kW6rvcjI-V_0NKcX_ZnbAw.png" /></figure><h3>Example 2 — One-Shot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*0cV8URMRS4fFk9P3LI2N3w.png" /></figure><h3>Example 3 — Few-Shot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*AX4AI2i1z3Q8GDGDt7a8qA.png" /></figure><h3>Example 4 — Chain of Thought</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*bbk5wguXhsLUB4R_9dc7lg.png" /></figure><h3>Example 5 — Tree of Thoughts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZRykNxP-xtXfS5f07S4Nvw.png" /></figure><h3>Conclusion</h3><p>Generative AI is transforming the way humans create, communicate, and solve problems. From generating text and images to assisting developers with code and helping businesses automate workflows, its impact continues to grow across industries. Large Language Models have made interacting with AI more natural, while Prompt Engineering has become an essential skill for obtaining accurate and useful responses.</p><h3>Future of Generative AI</h3><ol><li><strong>Smarter AI Models</strong> — More accurate, reliable, and capable of advanced reasoning.</li><li><strong>Multimodal AI</strong> — Understand and generate text, images, audio, and video together.</li><li><strong>AI Agents</strong> — Autonomous systems that can plan and complete complex tasks.</li><li><strong>Personalized AI Assistants</strong> — AI tailored to individual users and businesses.</li><li><strong>Human–AI Collaboration</strong> — AI working alongside humans to improve productivity.</li><li><strong>Industry-Wide Adoption</strong> — Greater use across healthcare, education, finance, and manufacturing.</li><li><strong>Ethical &amp; Responsible AI</strong> — Stronger focus on fairness, transparency, privacy, and safety.</li><li><strong>Scientific Innovation</strong> — Faster discoveries in medicine, climate science, and engineering.</li><li><strong>Democratization of AI</strong> — AI tools becoming more accessible and affordable for everyone.</li><li><strong>Increased Automation</strong> — Automating repetitive tasks, enabling people to focus on creativity and innovation.</li></ol><p>Throughout this module, I learned that effective use of AI is not just about asking questions — it is about asking the right questions. Understanding prompting techniques, model parameters, and APIs has given me a strong foundation for building AI-powered applications in the future.</p><p>As Generative AI continues to evolve, I believe professionals who combine domain knowledge with AI skills will have a significant advantage. This learning journey has motivated me to keep exploring advanced topics such as Retrieval-Augmented Generation (RAG), AI agents, multimodal models, and AI application development. I am excited to continue learning and apply these technologies to solve real-world problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bc7a3a94b7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Natural Language Processing (NLP)]]></title>
            <link>https://medium.com/@sarikasony845/natural-language-processing-nlp-7ad553fbc20d?source=rss-d169e80a9c8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ad553fbc20d</guid>
            <dc:creator><![CDATA[Sarika Sony]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 09:52:31 GMT</pubDate>
            <atom:updated>2026-07-28T09:52:31.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*Y-2s_qjJBBXoIpGF" /></figure><h3><strong>Introduction to NLP :</strong></h3><p><strong>Natural Language Processing (NLP)</strong> is a branch of <strong>Artificial Intelligence (AI)</strong> that focuses on enabling computers to understand, interpret, and generate human language.</p><p>NLP bridges the gap between <strong>human communication</strong> and <strong>machine understanding</strong>.</p><h4>Real-World Applications</h4><ul><li><strong>Chatbots</strong>: Automating customer service.</li><li><strong>Search Engines</strong>: Understanding queries and ranking results.</li><li><strong>Grammar Tools</strong>: Grammarly uses NLP for corrections.</li><li><strong>Voice Assistants</strong>: Alexa, Siri, Cortana rely on NLP for speech recognition.</li><li><strong>Sentiment Analysis</strong>: Brands analyze customer opinions from reviews/social media.</li><li><strong>Machine Translation</strong>: Google Translate converts text across languages.</li></ul><h4>Reasons NLP is Hard :</h4><ul><li><strong>Ambiguity</strong></li></ul><p>Words and sentences can mean different things depending on context. Example: <em>“bank”</em> → financial institution or river side.</p><ul><li><strong>Context Dependence</strong></li></ul><p>Meaning often relies on previous sentences or background knowledge. Example: <em>“She dropped the glass. It broke.”</em> → “It” refers to the glass.</p><ul><li><strong>Sarcasm and Emotion</strong></li></ul><p>Machines struggle to detect sarcasm, irony, or emotional tone .Example: <em>“Oh, fantastic… another exam tomorrow!”</em> → Negative, not positive.</p><ul><li><strong>Language Variety</strong></li></ul><p>Slang, dialects, typos, and low-resource languages make NLP harder. Example: <em>“gr8 job lol 😂”</em> → Informal text that needs decoding.</p><h4>Challenges in NLP</h4><ul><li><strong>Ambiguity</strong>: Words with multiple meanings.</li><li><strong>Sarcasm/Irony</strong>: Difficult for machines to detect.</li><li><strong>Low-Resource Languages</strong>: Limited data for training.</li><li><strong>Bias</strong>: Models may reflect biases present in training data.</li></ul><p>NLP is important because it makes technology <strong>more human-friendly,</strong> helps businesses gain insights, and enables global communication. Without NLP, computers would only understand rigid commands instead of natural language.</p><h3>2. Text Preprocessing :</h3><p><strong>Text Preprocessing</strong> is the initial step in an NLP pipeline where raw text is cleaned and transformed into a structured format that machines can understand.</p><p><strong>Purpose</strong>: Remove noise and make text consistent.</p><p><strong>Steps involved</strong>:</p><ul><li><strong>Tokenization</strong> → splitting text into words or sentences.</li><li><strong>Stopword Removal</strong> → removing common words like “is”, “the”.</li><li><strong>Stemming</strong> → cutting words to their root form.</li><li><strong>Lemmatization</strong> → reducing words to their dictionary base form.</li><li><strong>Text Cleaning</strong> → removing punctuation, numbers, or special characters.</li></ul><p>Stemming VS Lemmatization</p><ul><li><strong>Stemming</strong> = quick, simple, but sometimes inaccurate.</li><li><strong>Lemmatization</strong> = slower, but precise and meaningful.</li><li>Choice depends on your NLP task: use stemming for speed, lemmatization for accuracy.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*eIljhkrG6DIkpA5c.jpeg" /></figure><h3>3. One-Hot Encoding :</h3><p><strong>Text Representation / Feature Extraction methods</strong>.</p><ul><li><strong>Purpose</strong>: Convert raw text into numerical form so that machine learning models can process it.</li></ul><p><strong>One-Hot Encoding</strong> is a technique used to represent words or categorical data as numerical vectors.</p><ul><li>Each word in the vocabulary is assigned a unique vector.</li><li>The vector contains all 0s except for one position marked as 1.</li></ul><h4>Disadvantages of OHE :</h4><ul><li><strong>High Dimensionality</strong>: For large vocabularies (like thousands of words), vectors become very long and sparse.</li><li><strong>No Semantic Meaning</strong>: Words are treated as independent; “cat” and “dog” have no similarity in this representation.</li><li><strong>Memory Inefficient</strong>: Requires lots of storage and computation for big datasets.</li><li><strong>Poor Generalization</strong>: Cannot capture relationships between words (e.g., synonyms or context).</li></ul><h3>4. Bag of Words (BoW) :</h3><p><strong>Bag of Words</strong> is a simple way to represent text data.</p><p>BoW represents text by counting how often each word appears in a document, ignoring grammar and word order.</p><ul><li>Focuses only on <strong>word frequency</strong> (how many times each word appears.</li></ul><h4>Disadvantages</h4><ul><li><strong>Ignores word order</strong>: “dog bites man” and “man bites dog” look the same.</li><li><strong>High dimensionality</strong>: Large vocabularies create huge vectors.</li><li><strong>No meaning captured</strong>: Words are independent; semantic relationships are lost.</li><li><strong>Sparse data</strong>: Most entries in vectors are 0, wasting memory.</li></ul><h3>5. TF-IDF:</h3><p><strong>TF‑IDF</strong> is a numerical statistic that reflects how important a word is in a document compared to a collection of documents (corpus).</p><ul><li><strong>TF (Term Frequency)</strong> → How often a word appears in a document.</li><li><strong>IDF (Inverse Document Frequency)</strong> → How rare or unique the word is across all documents.</li></ul><h3>How It Works</h3><ol><li><strong>Term Frequency (TF) </strong>Formula:</li></ol><p>TF(t)=Number of times term t appears in a document/ Total number of terms in the document</p><p><strong>2. Inverse Document Frequency (IDF) </strong>Formula:</p><ul><li>IDF(t)=log⁡(Total number of documentsNumber of documents containing term t)</li></ul><ol><li><strong>TF‑IDF Score</strong></li></ol><ul><li>Combines both : TF-IDF(t)=TF(t)×IDF(t)</li><li>Words that appear often in one document but rarely across others get <strong>higher scores</strong>.</li></ul><h4>Advantages</h4><ul><li>Captures <strong>importance</strong> of words, not just frequency.</li></ul><h4>Disadvantages</h4><ul><li>Still ignores word order and context.</li><li>Cannot capture semantic meaning (relationships between words).</li><li>Works best for smaller datasets; embeddings are better for deep NLP.</li></ul><h3>6. Limitations of One-Hot Encoding, BoW, and TF-IDF</h3><ul><li><strong>Sparsity</strong> → Most entries in the word vectors are 0, wasting memory and computation.</li><li><strong>No semantic understanding</strong> → Words are treated as independent, so meaning or similarity (like “cat” vs “dog”) is lost.</li><li><strong>No contextual information</strong> → Word order and sentence structure are ignored, so “dog bites man” = “man bites dog.”</li><li><strong>High dimensionality</strong> → Large vocabularies create huge vectors, making models slow and inefficient.</li></ul><h3>7. Neural Probabilistic Language Model (NPLM)</h3><p>The Neural Probabilistic Language Model (NPLM) is a feed‑forward neural network introduced by Bengio et al. (2003) that learns word embeddings and predicts the probability of the next word in a sequence. It was groundbreaking because it overcame the sparsity and dimensionality issues of traditional n‑gram models, but it struggled with scalability and long‑term context.</p><h4>Architecture of NPLM</h4><ul><li><strong>Word Embeddings</strong>: Each word is mapped to a continuous vector representation.</li><li><strong>Context Window</strong>: A fixed number of previous words (e.g., last 3–5 tokens) are concatenated into a single vector.</li><li><strong>Feed‑Forward Neural Network</strong>: The concatenated vector passes through hidden layers (originally tanh activation).</li><li><strong>Softmax Layer</strong>: Outputs probabilities for the next word across the vocabulary.</li><li><strong>Training Objective</strong>: Minimize cross‑entropy (negative log likelihood) of predicted vs. actual next word.</li></ul><h4>Advantages</h4><ul><li><strong>Distributed Representations</strong>: Learns embeddings that capture similarity between words.</li><li><strong>Generalization</strong>: Can assign probabilities to unseen word sequences by leveraging embeddings.</li><li><strong>Better than n‑grams</strong>: Reduces sparsity and dimensionality issues.</li><li><strong>Foundation for Modern NLP</strong>: Inspired later models like Word2Vec, GloVe, and Transformers.</li></ul><h4>Limitations</h4><ul><li><strong>Fixed Context Window</strong>: Cannot capture long‑term dependencies beyond a few words.</li><li><strong>Computationally Expensive</strong>: Training requires large parameter sets and heavy computation.</li><li><strong>Slow Training</strong>: Compared to simple statistical models.</li><li><strong>Obsolete Today</strong>: Replaced by RNNs, LSTMs, and Transformers that handle longer contexts more efficiently.</li></ul><h3>8. Word2Vec</h3><p><strong>Word2Vec</strong> is a neural network–based model developed by Google in 2013 that learns vector representations of words.</p><ul><li>Unlike <strong>One-Hot Encoding</strong> or <strong>Bag of Words</strong>, Word2Vec captures <strong>semantic meaning</strong> and <strong>relationships</strong> between words.</li><li>Words with similar meanings (like “king” and “queen”) end up with vectors close to each other in the embedding space.</li></ul><p>It uses two main architectures:</p><ul><li><strong>Continuous Bag of Words (CBOW)</strong> → predicts a word from its context.</li><li><strong>Skip-Gram</strong> → predicts context words from a given word.</li></ul><h4>Advantages of Word2Vec</h4><ul><li><strong>Semantic Understanding</strong>: Captures similarity and relationships (e.g., <em>king — man + woman = queen</em>).</li><li><strong>Efficient Training</strong>: Much faster than earlier models like NPLM.</li><li><strong>Low Dimensionality</strong>: Produces dense vectors instead of sparse ones.</li><li><strong>Widely Used</strong>: Became the foundation for modern NLP tasks like sentiment analysis, machine translation, and recommendation systems.</li></ul><h3>Limitations of Word2Vec</h3><ul><li><strong>No Contextual Meaning</strong>: Each word has a single fixed vector; “bank” (river vs finance) is treated the same.</li><li><strong>Requires Large Data</strong>: Needs huge corpora to learn good embeddings.</li><li><strong>Ignores Word Order</strong>: Focuses on co-occurrence, not sentence structure.</li><li><strong>Replaced by Modern Models</strong>: Contextual embeddings (like BERT, GPT, Transformers) outperform Word2Vec by handling polysemy and long-range dependencies.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6UfaXOAI1yh-fV_u.png" /></figure><h3><strong>9. Continuous Bag of Words (CBOW)</strong></h3><p>It is a Word2Vec model architecture that predicts a <strong>target word</strong> based on its surrounding <strong>context words</strong>.</p><ul><li>It uses a fixed-size window of words around the target.</li><li>Example: In <em>“The cat sat on the mat”</em>, CBOW uses [“The”, “sat”, “on”, “the”, “mat”] to predict “cat”.</li></ul><h4>Architecture</h4><ol><li><strong>Input Layer</strong>: Context words (surrounding words) are converted into embeddings.</li><li><strong>Projection Layer</strong>: Embeddings are averaged (or summed) to form a single vector.</li><li><strong>Hidden Layer</strong>: A feed-forward neural network processes this vector.</li><li><strong>Output Layer (Softmax)</strong>: Predicts the probability distribution of the target word.</li></ol><h3><strong>10 .Skip‑Gram</strong></h3><p>It is a predictive model that learns word embeddings by using a <strong>target word</strong> to predict its <strong>context words</strong>.</p><ul><li>Example: In <em>“The cat sat on the mat”</em>, if the target word is “cat”, Skip‑Gram tries to predict nearby words like “The”, “sat”, “on”, “the”, “mat”.</li></ul><h4>Architecture</h4><ol><li><strong>Input Layer</strong>: A single target word is fed into the model.</li><li><strong>Hidden Layer</strong>: The word is mapped to a dense vector (embedding).</li><li><strong>Output Layer (Softmax)</strong>: Predicts probabilities of surrounding context words within a fixed window size.</li><li><strong>Training Objective</strong>: Maximize the likelihood of predicting correct context words given the target word.</li></ol><h3>11. Fast Text</h3><p><strong>FastText</strong> is an extension of Word2Vec that represents words as a combination of <strong>character n‑grams</strong>.</p><ul><li>Instead of treating each word as a single token, FastText breaks words into smaller subword units (like prefixes, suffixes, and character chunks).</li><li>This allows it to handle rare words and even out‑of‑vocabulary words more effectively than <strong>Word2Vec</strong>.</li></ul><p>Example: Word <em>“playing”</em> → represented as subwords: “pla”, “lay”, “ayi”, “yin”, “ing”.</p><h3>How It Works</h3><ol><li><strong>Subword Representation</strong>: Each word is split into character n‑grams (e.g., 3–6 characters long).</li><li><strong>Embedding Learning</strong>: Embeddings are learned for both the word and its subword units.</li><li><strong>Word Vector Construction</strong>: The final word vector is the sum of its subword embeddings.</li><li><strong>Training Objective</strong>: Similar to Skip‑Gram, FastText predicts context words given a target word, but with subword information included.</li></ol><h3><strong>12 . GloVe</strong></h3><p><strong>GloVe</strong> (developed by Stanford in 2014) is an unsupervised learning algorithm for generating word embeddings.</p><ul><li>Unlike <strong>Word2Vec</strong>, which relies on local context windows, GloVe uses <strong>global co‑occurrence statistics</strong> of words across the entire corpus.</li><li>The idea: words that appear in similar contexts across documents will have similar vector representations.</li></ul><p>Example: If “ice” and “solid” co‑occur often, while “ice” and “steam” co‑occur less, GloVe embeddings capture these relationships numerically.</p><h3>How It Works</h3><ol><li><strong>Co‑Occurrence Matrix</strong>: Build a matrix showing how often words appear together in the corpus.</li><li><strong>Probability Ratios</strong>: Compute ratios of co‑occurrence probabilities to capture semantic meaning.</li><li><strong>Matrix Factorization</strong>: Factorize the co‑occurrence matrix to produce dense word vectors.</li><li><strong>Word Embeddings</strong>: Each word gets a vector that reflects both local and global context.</li></ol><h3>Limitations of Static Word Embeddings</h3><ul><li><strong>Static Word Embeddings</strong> are fixed vector representations of words learned from large text corpora. Models like Word2Vec, FastText, and GloVe learn embeddings by analyzing word co‑occurrence patterns., Once trained, every word has <strong>one fixed vector</strong>.</li><li><strong>Polysemy Problem</strong> → Each word has only one fixed vector, so words with multiple meanings (like <em>“bank”</em> = riverbank vs financial bank) are represented the same way.</li><li><strong>Lack of Contextual Understanding</strong> → Static embeddings ignore sentence context, so “apple” in <em>“apple pie”</em> and <em>“Apple company”</em> share the same vector.</li><li><strong>Need for a Better Architecture</strong> → To overcome these issues, NLP required models that generate <strong>contextual embeddings</strong>, leading to architectures like <strong>Transformers (BERT, GPT)</strong> that adapt word meaning based on surrounding text.</li></ul><h3>14. Rule-Based Machine Translation (RBMT)</h3><p><strong>Rule‑Based Machine Translation (RBMT)</strong> is a traditional approach that translates text using <strong>linguistic rules</strong> and <strong>bilingual dictionaries</strong>.<strong>It was dominant from the 1950s through the 1990s before being replaced by statistical and neural methods.</strong></p><ul><li>It relies on manually crafted grammar, syntax, and semantic rules for both source and target languages.</li><li>Translation is performed by analyzing the structure of the source sentence and generating an equivalent structure in the target language.</li></ul><h3>Limitations</h3><ul><li><strong>Labor‑Intensive</strong>: Requires extensive linguistic knowledge and manual rule creation.</li><li><strong>Poor Scalability</strong>: Difficult to extend to new languages or domains.</li><li><strong>Limited Fluency</strong>: Translations may sound unnatural or rigid.</li><li><strong>Cannot Handle Ambiguity</strong>: Struggles with idioms, context, and polysemy.</li></ul><p>NOTE : <strong>Ambiguity</strong> means <strong>uncertainty or multiple possible meanings</strong>. In language, a word, phrase, or sentence can be interpreted in more than one way.</p><p><strong>Linguistic</strong> means <strong>related to language</strong> — how words, grammar, and meaning work together.</p><h3><strong>15 Statistical Machine Translation (SMT)</strong></h3><p>It is a data‑driven approach that translates text by learning <strong>probabilities</strong> from large bilingual corpora.</p><ul><li>Instead of relying on handcrafted grammar rules, SMT uses statistics to decide the most likely translation.</li><li>It became popular in the 1990s and 2000s, replacing RBMT because it scaled better and produced more natural translations.</li></ul><h4>Advantages</h4><ul><li><strong>Scalable</strong>: Easier to add new languages compared to RBMT.</li><li><strong>Data‑Driven</strong>: Learns automatically from bilingual text, reducing manual rule creation.</li><li><strong>Better Fluency</strong>: Produces more natural translations than rigid rule‑based systems.</li></ul><h4>Limitations</h4><ul><li><strong>Data Hungry</strong>: Requires large parallel corpora, which may not exist for low‑resource languages.</li><li><strong>Word‑by‑Word Issues</strong>: Sometimes mistranslates idioms or long‑range dependencies.</li><li><strong>Ambiguity Handling</strong>: Still struggles with polysemy and deep contextual meaning.</li></ul><h3>16. Neural Machine Translation (NMT)</h3><p><strong>Neural Machine Translation (NMT)</strong> uses <strong>deep learning models</strong> (especially <strong>Transformers</strong>) to translate text. NMT learns translation patterns directly from large amounts of bilingual text.It generates translations <strong>end‑to‑end</strong>, meaning the whole sentence is processed at once, not word‑by‑word or phrase‑by‑phrase.</p><h4>● Why Neural Machine Translation was introduced</h4><p>NMT was introduced to overcome the <strong>limitations of RBMT and SMT</strong>:</p><ul><li><strong>Contextual Understanding</strong> → SMT often translated word‑by‑word, missing long‑range dependencies. NMT uses neural networks to capture sentence‑level meaning.</li><li><strong>Fluency</strong> → SMT translations could sound unnatural. NMT produces smoother, human‑like sentences.</li><li><strong>Scalability</strong> → NMT adapts better to new languages and domains without handcrafted rules.</li><li><strong>Handling Ambiguity</strong> → NMT uses context to resolve polysemy (e.g., “bank” = riverbank vs financial bank).</li><li><strong>Efficiency</strong> → End‑to‑end training reduces complexity compared to SMT’s multiple components (translation model + language model + decoder).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*xBDJYzr5PyoWOnuu" /></figure><h3>17. Recurrent Neural Networks (RNN)</h3><p><strong>Recurrent Neural Network (RNN)</strong> is a type of neural network designed to process <strong>sequential data</strong> (like text, speech, or time series). Unlike regular neural networks, RNNs have <strong>memory</strong> — they remember previous inputs to help predict future ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i58alc33MEGQjYy2.png" /></figure><h3>RNN Architecture</h3><ol><li><strong>Input Layer </strong>Takes one element of the sequence at a time (e.g., one word in a sentence). Inputs are usually represented as vectors (like word embeddings)</li><li><strong>Hidden Layer </strong>The core of the RNN. Has a <strong>recurrent connection</strong> — meaning the hidden state at time step t depends on both the current input xt and the previous hidden state ht−1.</li></ol><ul><li>Formula: ht=f(Wx⋅xt+Wh⋅ht−1+b)</li></ul><p>where f is an activation function (like tanh or ReLU).</p><p><strong>3. Output Layer </strong>Produces the prediction at each time step (e.g., next word, sentiment label, translation). Can output after each step or only at the end of the sequence.</p><p><strong>Recurrent Loop </strong>The loop in the hidden layer allows information to “flow forward in time.”</p><h4>Working</h4><ol><li><strong>Sequential Input</strong> → Words or time steps are fed one by one.</li><li><strong>Hidden State Update</strong> → Each step updates the hidden state using current input + previous state.</li><li><strong>Output Generation</strong> → Produces output at each step or after the full sequence.</li><li><strong>Backpropagation Through Time (BPTT)</strong> → The network learns by adjusting weights across all time steps. , Example: In a sentence “I love machine learning,” the RNN remembers “I love” when predicting “machine.”</li></ol><h4>Advantages</h4><ul><li><strong>Sequential Memory</strong> → Remembers previous inputs, unlike feed‑forward networks</li><li><strong>Context Awareness</strong> → Useful for tasks like text generation, translation, and speech recognition.</li><li><strong>Parameter Sharing</strong> → Same weights used across time steps, reducing complexity</li></ul><h4>Limitations</h4><ul><li><strong>Vanishing Gradient Problem</strong> → Hard to learn long‑term dependencies.</li><li><strong>Slow Training</strong> → Sequential processing prevents parallelization.</li><li><strong>Short‑Term Memory</strong> → Struggles with long sentences or long time series.</li><li><strong>Replaced by LSTM/GRU</strong> → Modern variants handle long‑term dependencies better.</li></ul><h3>18. Long Short-Term Memory (LSTM)</h3><p>LSTMs were introduced to <strong>fix RNN’s short‑term memory problem</strong>. By using gates and a cell state, they can <strong>remember long‑term dependencies</strong> and produce more accurate results in tasks like <strong>machine translation</strong>, <strong>speech recognition</strong>, and <strong>text generation</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CxNHbkdCslaTTbne.png" /></figure><h4>Architecture</h4><ul><li>Built on the RNN structure but adds <strong>memory cells</strong>.</li><li>Each cell has <strong>three gates</strong> to control information flow.</li><li>Formula idea: ht,ct=LSTM(xt,ht−1,ct−1)</li></ul><p>where ct is the cell state (long‑term memory).</p><h4>Gates</h4><ul><li><strong>Forget Gate</strong> → Decides what past information to discard.</li><li><strong>Input Gate</strong> → Decides what new information to store.</li><li><strong>Output Gate</strong> → Decides what information to send out as hidden state.</li></ul><p>Together, these gates allow LSTMs to <strong>remember long‑term dependencies</strong> and avoid the <strong>vanishing gradient problem</strong>.</p><h4>Advantages over RNN</h4><ul><li>Handles <strong>long sequences</strong> better.</li><li>Solves <strong>vanishing/exploding gradients</strong>.</li><li>Captures <strong>long‑term context</strong> (e.g., meaning across paragraphs).</li><li>Widely used in <strong>translation, speech recognition, and text generation</strong> before Transformers.</li></ul><h3>19. Gated Recurrent Unit (GRU)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*iAOatXlf_spY1y65" /></figure><h3>Architecture</h3><ul><li>GRU is a simplified version of <strong>LSTM</strong>.</li><li>It merges the <strong>cell state</strong> and <strong>hidden state</strong> into a single state.</li><li>Uses <strong>two gates</strong> instead of three:</li></ul><ol><li><strong>Update Gate </strong>Decides how much of the past information should be carried forward. Similar to combining the forget + input gates of LSTM.</li><li><strong>Reset Gate </strong>Decides how much of the past information to forget when adding new input.</li></ol><p>Formula idea : ht=(1−zt)⋅ht−1+zt⋅h~t</p><p>where zt is the update gate and h~t is the candidate hidden state.</p><h4>Advantages over LSTM</h4><ul><li><strong>Simpler Design</strong> → Only two gates, fewer parameters.</li><li><strong>Faster Training</strong> → Less computation, more efficient.</li><li><strong>Less Data Hungry</strong> → Works well even with smaller datasets.</li><li><strong>Comparable Accuracy</strong> → Often performs as well as LSTM in practice.</li><li><strong>Easier to Implement</strong> → More lightweight for real‑time applications.</li></ul><h4>Key Takeaway</h4><ul><li><strong>RNN</strong> → Struggles with long sequences.</li><li><strong>LSTM</strong> → Adds memory cells + 3 gates to solve long‑term dependency issues.</li><li><strong>GRU</strong> → Streamlined version with 2 gates, faster and simpler, often just as effective.</li></ul><h3>20. Sequence-to-Sequence (Seq2Seq) using LSTM</h3><p>Seq2Seq with LSTM was a <strong>major breakthrough in NLP</strong> — enabling translation, summarization, and dialogue systems. But it struggled with long sentences, which led to the introduction of <strong>Attention</strong> and eventually <strong>Transformers</strong>, the backbone of modern NLP.</p><h4>Encoder</h4><ul><li>The <strong>Encoder</strong> is an LSTM network that processes the input sequence (e.g., an English sentence).</li><li>Each word is fed step by step, updating hidden state ht and cell state ct.</li><li>The final hidden + cell states act as a <strong>summary of the entire input sentence</strong>.</li></ul><h4>Decoder</h4><ul><li>The <strong>Decoder</strong> is another LSTM network.</li><li>It starts with the encoder’s final states (context vector).</li><li>Generates the target sequence (e.g., Telugu sentence) one word at a time.</li><li>Uses <strong>teacher forcing</strong> during training → feeds the correct previous word to guide learning.</li></ul><h4>Context Vector</h4><ul><li>The <strong>Context Vector</strong> is the compressed representation of the input sentence</li><li>It contains the encoder’s final hidden and cell states.</li><li>Acts as the “bridge” between encoder and decoder.</li><li>Limitation: For long sentences, this single vector may lose important details (bottleneck problem).</li></ul><h4>Limitations</h4><ul><li><strong>Bottleneck Issue</strong> → Entire input squeezed into one vector; long sentences lose information.</li><li><strong>Sequential Processing</strong> → Training is slow, cannot parallelize easily.</li><li><strong>Limited Context</strong> → Better than RNN, but weaker than <strong>Attention Mechanisms</strong>.</li><li><strong>Performance Gap</strong> → Modern <strong>Transformers</strong> outperform Seq2Seq LSTMs in translation and summarization.</li></ul><h3>21. Seq2Seq with Attention Mechanism</h3><p>Seq2Seq with Attention solves the bottleneck problem of basic Seq2Seq by letting the decoder “look back” at all encoder states instead of relying on a single fixed context vector. This makes translations more accurate, especially for long sentences.</p><h4>Working of Seq2Seq with Attention</h4><ul><li>The <strong>encoder</strong> processes the input sequence and produces hidden states for each token.</li><li>At each decoding step, the <strong>decoder</strong> doesn’t just rely on one context vector — it computes <strong>attention scores</strong> for all encoder hidden states.</li><li>These scores determine which parts of the input are most relevant for generating the current output token.</li><li>The decoder then uses a <strong>weighted sum of encoder states</strong> (the attention context) to generate the next word.</li></ul><h4>Context Vector Generation</h4><ul><li>In basic Seq2Seq: one <strong>fixed vector</strong> (final encoder state) is passed to the decoder.</li><li>In Seq2Seq with Attention:</li><li>For each output step, the decoder computes <strong>alignment scores</strong> between its current state and each encoder hidden state.</li><li>These scores are normalized into <strong>attention weights</strong> (via softmax).</li><li>The <strong>context vector</strong> is then a weighted sum of all encoder hidden states, dynamically changing at each step.</li></ul><h4>Advantages over Basic Seq2Seq</h4><ul><li><strong>No Bottleneck</strong> → Decoder can access all encoder states, not just one compressed vector.</li><li><strong>Better Long‑Sentence Handling</strong> → Retains information from earlier parts of the input.</li><li><strong>Improved Accuracy</strong> → Produces more fluent and contextually correct translations.</li><li><strong>Alignment Visualization</strong> → Attention weights show which input words influenced each output word (helpful in debugging and interpretability).</li></ul><p>NOTE : The attention mechanism in NLP allows models to focus on the most relevant parts of an input sequence when generating outputs, solving the bottleneck problem of Seq2Seq and enabling modern architectures like Transformers. It computes dynamic context vectors by weighting encoder states based on their importance to each decoding step.</p><h3>22. Transformer Architecture</h3><h4>Why Transformers Were Needed</h4><ul><li><strong>RNNs</strong> and <strong>LSTMs</strong> struggled with <strong>long sequences</strong>, <strong>slow training</strong>, and <strong>vanishing gradients</strong>.</li><li>Seq2Seq with <strong>Attention</strong> improved performance, but still relied on recurrent processing.</li><li>Transformers solved these issues by using <strong>self‑attention</strong> and parallelization, making them the backbone of modern NLP (e.g., GPT, BERT).</li></ul><h4>Encoder–Decoder Architecture</h4><ul><li><strong>Encoder</strong> → Processes input sequence into contextual representations.</li><li><strong>Decoder</strong> → Generates output sequence using encoder outputs + self‑attention.</li><li>Used in tasks like <strong>translation</strong> and <strong>summarization</strong>.</li></ul><h4>Self‑Attention</h4><ul><li>Each word looks at <strong>all other words</strong> in the sequence to understand context.</li><li>Example: In “The bank near the river,” self‑attention helps distinguish “bank” as a riverbank, not financial.</li><li>Formula: Query–Key–Value mechanism computes attention weights.</li></ul><h4>Multi‑Head Attention</h4><ul><li>Runs self‑attention multiple times in parallel (“heads”).</li><li>Each head focuses on different aspects (syntax, semantics, relationships).</li><li>Outputs are combined for richer context.</li></ul><h4>Positional Encoding</h4><ul><li>Since Transformers don’t process sequentially, they add <strong>positional encodings</strong> to represent word order.</li><li>Example: “dog bites man” ≠ “man bites dog.”</li></ul><h4>Feed Forward Network</h4><ul><li>After attention, each token passes through a <strong>fully connected feed‑forward layer</strong>.</li><li>Adds non‑linearity and transforms contextual embeddings.</li></ul><h4>Residual Connections</h4><ul><li>Skip connections that add input back to output of each layer.</li><li>Prevents vanishing gradients and stabilizes training.</li></ul><h4>Layer Normalization</h4><ul><li>Normalizes values across features.</li><li>Improves training stability and convergence speed.</li></ul><h4>Advantages over RNN/LSTM</h4><ul><li><strong>Parallelization</strong> → Faster training (no sequential bottleneck).</li><li><strong>Long‑Range Dependencies</strong> → Self‑attention captures relationships across entire sequences.</li><li><strong>Scalability</strong> → Works well with massive datasets.</li><li><strong>State‑of‑the‑Art Performance</strong> → Powers models like <strong>BERT</strong>, <strong>GPT</strong>, and <strong>T5</strong>.</li></ul><h3>23. Supervised Fine-Tuning (SFT) Pipeline</h3><p>This is the process of adapting a <strong>Base LLM</strong> (like GPT, LLaMA, etc.) to follow instructions better.</p><h4>Base LLM</h4><p>Start with a pretrained large language model trained on massive text corpora.</p><h4>Instruction Dataset</h4><p>Prepare a dataset of input–output pairs (questions and answers, prompts and completions).</p><h4>Tokenization</h4><p>Convert text into tokens using the model’s tokenizer so it can process sequences.</p><h4>Fine-Tuning</h4><p>Train the base model on the instruction dataset using supervised learning to align outputs.</p><h4>Evaluation</h4><p>Test the fine-tuned model using metrics like BLEU, ROUGE, and accuracy to measure performance.</p><h4>Deployment</h4><p>Deploy the fine-tuned model into applications such as chatbots, translation systems, or APIs.</p><h3>24. Evaluation Metrics</h3><ul><li><strong>ROUGE</strong> → Evaluates text summarization by comparing overlap of words, phrases, or sequences between generated and reference summaries.</li><li><strong>Perplexity</strong> → Indicates how well a language model predicts the next word; lower perplexity means the model is more confident and accurate.</li><li><strong>Precision</strong> → Fraction of correctly predicted positive items among all predicted positives; measures exactness.</li><li><strong>Recall</strong> → Fraction of correctly predicted positives among all actual positives; measures completeness.</li><li><strong>F1‑Score</strong> → Harmonic mean of precision and recall; balances both accuracy and coverage.</li><li><strong>Accuracy</strong>→ Overall proportion of correct predictions out of all predictions; used in classification tasks.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ad553fbc20d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gaining basic Knowledge on Probability]]></title>
            <link>https://medium.com/@sarikasony845/gaining-basic-knowledge-on-probability-c9f8a2633a05?source=rss-d169e80a9c8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9f8a2633a05</guid>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[theory]]></category>
            <dc:creator><![CDATA[Sarika Sony]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 09:25:53 GMT</pubDate>
            <atom:updated>2025-11-27T09:25:53.261Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><ul><li>In certain cases we cannot exactly predict the outcome ,In those cases we try to measure the chance of occurrence of that outcome.</li><li>Probability is know as the study of uncertainty .</li></ul><p>Probability = Number of favourable outcomes/ Total number of outcomes</p><h3><strong>Representations Of Probability:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/0*bJU4sj_uDWEs5hwL" /></figure><h3><strong>Basic Terminology:</strong></h3><ol><li>Random Experiment: It is an action, test ,or simply doing something, where the outcome is unpredictable.</li></ol><h4>Characteristics of Random Experiment:</h4><ul><li>The output should be unpredictable</li><li>The minimum number of outcomes should be two</li><li>The experiment can be performed multiple times.</li></ul><p>2. Sample Space: The set of all possible outcomes when a random experiment is performed.</p><p>3. Event: Our desired outcomes , it is a subset on sample space.</p><p>4. Trail: count of how many times a random experiment is performed .</p><p>5. Outcome: The result of a random experiment.</p><p><strong>let us understand these terminologies with a simple example :</strong></p><p>Q) WHAT IS THE PROBABILITY OF GETTING AN EVEN NUMBER WHEN A DICE IS ROLLED ?</p><p>Random space= Rolling a dice</p><p>Sample space={1,2,3,4,5,6}</p><p>Event={2,4,6}</p><p>outcome=1/2</p><h3>Types of Events</h3><p><strong>A. Univariate Event</strong></p><ul><li>Involves a single outcome at a time.</li><li>Includes types of events based on likelihood:</li><li><strong>Impossible event</strong> → Probability = 0</li><li><strong>Unlikely event</strong> → Probability between 0 and 0.5</li><li><strong>Even chance event</strong> → Probability = 0.5</li><li><strong>Likely event</strong> → Probability between 0.5 and 1</li><li><strong>Sure event</strong> → Probability = 1 (certain event)</li></ul><p><strong>B. Multivariable Event</strong></p><ul><li>Involves more than one outcome or more than one variable.</li><li>Includes interactions between events, such as:</li><li><strong>Independent events(</strong>events where the outcome of one does not affect the probability of the other<strong>).</strong></li><li><strong>Dependent events(</strong> events where the outcome of one affects the probability of the other<strong>).</strong></li><li><strong>Mutually exclusive event(</strong> two or more events that cannot happen at the same time<strong>).</strong></li></ul><h3><strong>TYPES OF PROBABILITY:</strong></h3><ol><li><strong>Marginal probability</strong> : The probability of a single event, irrespective of the outcome of any other event.</li><li><strong>Conditional probability</strong> : The probability of an event occurring given that another event has already occurred.</li><li><strong>Joint probability</strong> : The probability of two or more events occurring simultaneously.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9f8a2633a05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>