User Tools

Site Tools


tanszek:oktatas:techcomm:statistical_properties

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:techcomm:statistical_properties [2025/09/30 04:40] – [Event Space] kneheztanszek:oktatas:techcomm:statistical_properties [2025/09/30 05:33] (current) – [Frequency of Events] knehez
Line 1: Line 1:
-====== Statistical properties ======+====== Statistical properties of Information ======
  
 ==== Event Space ==== ==== Event Space ====
Line 7: Line 7:
 These events may form sets. Because they can be sets, we may perform standard //set operations// (union, intersection, complements, etc.) on them.  These events may form sets. Because they can be sets, we may perform standard //set operations// (union, intersection, complements, etc.) on them. 
  
-For example: the __union of two events__ in an experiment may represent the occurrence of either event, while the __intersection__ represents the simultaneous occurrence of both. When these operations occur, the event will carry information.+For example: the __union of two events__ in an experiment may represent the //occurrence of either event//, while the __intersection__ represents the //simultaneous occurrence of both//. When these operations occur, the event will carry information.
  
 The __value of information__ related to these events can vary significantly based on everyday experience. For instance, knowing that a rare event has occurred (such as winning the lottery) typically provides more valuable information than learning about an event that occurs frequently or predictably. The __value of information__ related to these events can vary significantly based on everyday experience. For instance, knowing that a rare event has occurred (such as winning the lottery) typically provides more valuable information than learning about an event that occurs frequently or predictably.
Line 19: Line 19:
 In the \( E_i \) event space, an event happened \(k_i\) times then the frequency of that given event may be calculated with the following formula:  In the \( E_i \) event space, an event happened \(k_i\) times then the frequency of that given event may be calculated with the following formula: 
  
-$$ freq_i=\frac{k_i}{k} $$+$$ freq_i=\frac{k_i}{k} = \frac{\text{number of favorable outcomes}}{\text{number of all possible outcomes}}$$
  
-This means that we divide the number of all events by the number (frequency) of that given event. In case of a large number of experiments this number will show us the probability of that event.+This means that we divide the number of that //given event// by the number of all //experiments//. In the case of a large number of experimentsthis number will show us the probability of that event.
  
 $$ \lim_{k \to \infty} freq_i = \frac{k_i}{k} =  P(E_i) $$ $$ \lim_{k \to \infty} freq_i = \frac{k_i}{k} =  P(E_i) $$
Line 35: Line 35:
 {{:tanszek:oktatas:techcomm:pasted:20240826-164556.png}} {{:tanszek:oktatas:techcomm:pasted:20240826-164556.png}}
  
-The probability of every event will be 1/6 which can be calculated with the following formula. The rolls (of the dice) will form a so-called //full event system//. In the case of a //full event system// the sum of the probabilities (of each event) is 1 (by definition).+The probability of every event will be \(\frac{1}{6}\), which can be calculated with the following formula. The rolls (of the dice) will form a so-called //full event system//. In the case of a //full event system// the sum of the probabilities (of each event) is 1 (by definition).
  
 If one of the events happens then the others can not happen: If one of the events happens then the others can not happen:
Line 81: Line 81:
 Create sets containing all the possibilities.    Create sets containing all the possibilities.   
  
-Try the following c code here: https://www.onlinegdb.com/online_c_compiler and examine the results.+Try the following c code here: [[https://www.onlinegdb.com/online_c_compiler| online compiler]] and examine the results.
  
 <sxh c> <sxh c>
Line 88: Line 88:
 #include <time.h> #include <time.h>
  
-#define SIMULATIONS 1000+#define SIMULATIONS 10000
  
 // Function to simulate the birth of twins // Function to simulate the birth of twins
Line 114: Line 114:
  
     // Calculate and print the result     // Calculate and print the result
-    double probability = (double)at_least_one_girl / SIMULATIONS * 100+    float probability = (float)at_least_one_girl / SIMULATIONS; 
-    printf("In %.2f%% of cases, there is at least one girl in the twin pair.\n", probability);+    printf("In %.2f%% of cases, there is at least one girl in the twin pair.\n", probability * 100.0f);
  
     return 0;     return 0;
tanszek/oktatas/techcomm/statistical_properties.1759207216.txt.gz · Last modified: 2025/09/30 04:40 by knehez