Share to: share facebook share twitter share wa share telegram print page

Circular mean

In mathematics and statistics, a circular mean or angular mean is a mean designed for angles and similar cyclic quantities, such as times of day, and fractional parts of real numbers.

This is necessary since most of the usual means may not be appropriate on angle-like quantities. For example, the arithmetic mean of 0° and 360° is 180°, which is misleading because 360° equals 0° modulo a full cycle.[1] As another example, the "average time" between 11 PM and 1 AM is either midnight or noon, depending on whether the two times are part of a single night or part of a single calendar day.

The circular mean is one of the simplest examples of directional statistics and of statistics of non-Euclidean spaces. This computation produces a different result than the arithmetic mean, with the difference being greater when the angles are widely distributed. For example, the arithmetic mean of the three angles 0°, 0°, and 90° is (0° + 0° + 90°) / 3 = 30°, but the vector mean is arctan(1/2) = 26.565°. Moreover, with the arithmetic mean the circular variance is only defined ±180°.

Definition

Since the arithmetic mean is not always appropriate for angles, the following method can be used to obtain both a mean value and measure for the variance of the angles:

Convert all angles to corresponding points on the unit circle, e.g., to . That is, convert polar coordinates to Cartesian coordinates. Then compute the arithmetic mean of these points. The resulting point will lie within the unit disk but generally not on the unit circle. Convert that point back to polar coordinates. The angle is a reasonable mean of the input angles. The resulting radius will be 1 if all angles are equal. If the angles are uniformly distributed on the circle, then the resulting radius will be 0, and there is no circular mean. (In fact, it is impossible to define a continuous mean operation on the circle.) In other words, the radius measures the concentration of the angles.

Given the angles a common formula of the mean using the atan2 variant of the arctangent function is

Using complex arithmetic

An equivalent definition can be formulated using complex numbers:

.

In order to match the above derivation using arithmetic means of points, the sums would have to be divided by . However, the scaling does not matter for and , thus it can be omitted.

This may be more succinctly stated by realizing that directional data are in fact vectors of unit length. In the case of one-dimensional data, these data points can be represented conveniently as complex numbers of unit magnitude , where is the measured angle. The mean resultant vector for the sample is then:

The sample mean angle is then the argument of the mean resultant:

The length of the sample mean resultant vector is:

and will have a value between 0 and 1. Thus the sample mean resultant vector can be represented as:

Similar calculations are also used to define the circular variance.

Properties

The circular mean,

The distance is equal to half the squared Euclidean distance between the two points on the unit circle associated with and .

Example

A simple way to calculate the mean of a series of angles (in the interval [0°, 360°)) is to calculate the mean of the cosines and sines of each angle, and obtain the angle by calculating the inverse tangent. Consider the following three angles as an example: 10, 20, and 30 degrees. Intuitively, calculating the mean would involve adding these three angles together and dividing by 3, in this case indeed resulting in a correct mean angle of 20 degrees. By rotating this system anticlockwise through 15 degrees the three angles become 355 degrees, 5 degrees and 15 degrees. The arithmetic mean is now 125 degrees, which is the wrong answer, as it should be 5 degrees. The vector mean can be calculated in the following way, using the mean sine and the mean cosine :

Implementation

In this python code we use day hours to find circular average of them:

import math

def circular_mean(hours):
    # Convert hours to radians
    # To convert from hours to degrees, we need to
    # multiply hour by 360/24 = 15.
    radians = [math.radians(hour * 15) for hour in hours]

    # Calculate the sum of sin and cos values
    sin_sum = sum([math.sin(rad) for rad in radians])
    cos_sum = sum([math.cos(rad) for rad in radians])

    # Calculate the circular mean using arctan2
    mean_rad = math.atan2(sin_sum, cos_sum)

    # Convert the mean back to hours
    mean_hour = (math.degrees(mean_rad) / 15) % 24

    return mean_hour

# Example usage:
hours = [0, 12, 18]
mean_hour = circular_mean(hours)
print("First Circular mean:", round(mean_hour, 2))

hours = [0, 12]
mean_hour = circular_mean(hours)
print("Second Circular mean:", round(mean_hour, 2))

hours = [0, 0, 12, 12, 24]
mean_hour = circular_mean(hours)
print("Third Circular mean:", round(mean_hour, 2))

Generalizations

Spherical mean

A series of N independent unit vectors are drawn from a von Mises–Fisher distribution. The maximum likelihood estimates of the mean direction is simply the normalized arithmetic mean, a sufficient statistic:[2]

Weighted spherical mean

A weighted spherical mean can be defined based on spherical linear interpolation.[3]

See also

References

  1. ^ Christopher M. Bishop: Pattern Recognition and Machine Learning (Information Science and Statistics), ISBN 0-387-31073-8
  2. ^ Mardia, Kanti; Jupp, P. E. (1999). Directional Statistics. John Wiley & Sons Ltd. ISBN 978-0-471-95333-3.
  3. ^ Buss, Samuel R.; Fillmore, Jay P. (2001). "Spherical averages and applications to spherical splines and interpolation". ACM Transactions on Graphics. 20 (2). Association for Computing Machinery (ACM): 95–126. doi:10.1145/502122.502124. ISSN 0730-0301.

Further reading

This information is adapted from Wikipedia which is publicly available.

Read other articles:

Artikel atau sebagian dari artikel ini mungkin diterjemahkan dari Mega (penyimpanan) di en.wikipedia.org. Isinya masih belum akurat, karena bagian yang diterjemahkan masih perlu diperhalus dan disempurnakan. Jika Anda menguasai bahasa aslinya, harap pertimbangkan untuk menelusuri referensinya dan menyempurnakan terjemahan ini. Anda juga dapat ikut bergotong royong pada ProyekWiki Perbaikan Terjemahan. (Pesan ini dapat dihapus jika terjemahan dirasa sudah cukup tepat. Lihat pula: panduan penerjem…

Jacob Kuyper (ca. 1883) Jacob Kuyper (Rotterdam, 21 september 1821 – Den Haag, 3 februari 1908, ook geschreven als Jacob Kuijper[1]) was aardrijkskundige en cartograaf. Hij was vanaf 1846 controleur, hoofdcontroleur en ontvanger der belastingen in verschillende plaatsen, grotendeels in Amsterdam. Tevens was hij in 1873 medeoprichter van het Koninklijk Nederlands Aardrijkskundig Genootschap (KNAG). Hij publiceerde meerdere aardrijkskundige werken, kaarten en atlassen: Atlas der wereld&#…

Dieser Artikel behandelt das bayerische Geschlecht von Hagenau. Zum Adelsgeschlecht Hagenau aus dem elsässischen Haguenau siehe Hagenau (Adelsgeschlecht). Wappen der Herren von Hagenau, nach Siebmachers Wappenbuch Schloss Hagenau in Österreich Schloss Hagenau (Michael Wening, 1721) Dorf-Kapelle (Hagenau) Schloss Hagenau mit Wappen derer von Handel (Adelsgeschlecht) über dem Eingangstor Die Herren von Hagenau (auch Hagenowe, Hagenower, Hagenauer) sind ein altes bayerisch / österreichisches Ad…

Pandemic Studios Tipo Filial de Electronic ArtsIndustria Creación de videojuegosForma legal filialFundación California 1998Disolución 2009Sede central Los Ángeles, California,  Estados UnidosProductos videojuegosEmpleados 228Empresa matriz Electronic ArtsSitio web Sitio web oficial[editar datos en Wikidata] Pandemic Studios era una desarrolladora de videojuegos con oficinas en Los Ángeles, California. El estudio es conocido por incluir entornos versátiles, flexibles y destru…

Bahasa Cebu Sinugboanon, Sugboanon, Binisayâ, Bisayâng Sugboanon, Sinugboanong Binisayâ, Sinibwano Cebuan,[1] Sebwano,[2] Bisaya 'Sinugbuanong Binisaya' ditulis dalam Aksara BadlitPengucapan[biˈsajɐʔ] /sɛˈbwɑːnoʊ/[3][4][5]Dituturkan diFilipinaWilayahBisaya Tengah, Negros Barat, Bisaya Timur, dan MindanaoEtnisSuku CebuPenutur27,5 juta jiwa (2020)[6]Rumpun bahasaAustronesia Melayu-PolinesiaFilipinaFilipina Tengah RayaFilipina Ten…

For other Pennsylvania townships of the same name, see Washington Township, Pennsylvania. Township in Pennsylvania, United StatesWashington TownshipTownshipBarto Bridge in Washington TownshipMotto: Continuing the Vision/Preserving the ValuesLocation of Washington Township in Berks County, PennsylvaniaWashington TownshipLocation of Washington Township in PennsylvaniaShow map of PennsylvaniaWashington TownshipWashington Township (the United States)Show map of the United StatesCoordinates: 40

Halaman ini berisi artikel tentang entertainer Hong Kong, yang bukan mengenai pesenam Amerika Serikat Lisa Wang. Liza WangLiza Wang mementaskan opera Kanton pada November 2006Nama asalHanzi: 汪明荃LahirWang Ming-chun28 Agustus 1947 (umur 76)Distrik Qingpu, Shanghai, Republik TiongkokNama lainLiza Wong, Lisa Wang, Lisa WangPekerjaanPemeran, Penyanyi, Pemandu acaraTahun aktif1967–kiniSuami/istriLaw Kar-ying (m. 2009)Karier musikNama lainThe Big Sister[1]AsalHon…

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (ديسمبر 2019) الصحة والمرأة (وومن آند هيلث Women & Health) عنوان مختصر (أيزو 4) Women Health الاختصاص صحة المرأة اللغة إنكليزية المحررون إلين ب. جولد Ellen B. Gold تفاصيل النشر الناشر روتلدج…

Thomas Coke. Thomas Coke adalah pemimpin gerakan misi Metodis yang mula-mula dan dikenal sebagai bapa misi Metodis.[1] Dia berperan besar dalam penyebaran ajaran Metodis setelah Revolusi Amerika.[1] Coke dilahirkan pada tanggal 9 September 1747 di Brecon, Wales.[1] Dia menempuh pendidikan teologi di Universitas Oxford.[1] Pada tahun 1770 dia menjadi diaken dan dua tahun kemudian menjadi seorang Imam di Gereja Inggris (Church of England).[1] Perjumpaan deng…

FSV Jägersburg Basisdaten Name FußballsportvereinViktoria Jägersburg 1928 e.V. Sitz Homburg-Jägersburg, Saarland Gründung 1928 Farben lila/weiß Vereinsvorstand Harald Schwind, Martin Germann Website fsv-jaegersburg.de Erste Fußballmannschaft Cheftrainer Tim Harenberg Spielstätte Alois-Omlor-Sportpark Plätze 1500 Liga Oberliga Rheinland-Pfalz/Saar 2021/22 18. Platz Heim Auswärts Der FSV Jägersburg ist ein deutscher Sportverein aus dem Homburger Stadtteil Jägersburg. Neben dem Fußball…

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Cabasa – news · newspapers · books · scholar · JSTOR (April 2021) (Learn how and when to remove this template message) CabasaA metal afuche-cabasaPercussion instrumentClassification PercussionHornbostel–Sachs classification112.1(Shaken idiophones or rattles …

2004 compilation album by the Who Then and NowGreatest hits album by The WhoReleased3 May 2004Recorded1964–2004GenreRockLength77:13LabelPolydor, GeffenProducerGlyn Johns, Kit Lambert, Bill Szymczyk, Shel Talmy, Simon Townshend, The WhoCompilerAndy McKaieThe Who chronology Live at the Royal Albert Hall(2003) Then and Now(2004) The 1st Singles Box(2004) Singles from Then and Now Real Good Looking Boy/Old Red WineReleased: 2004 Then and Now 1964–2007Compilation albumReleased11 June 2007Reco…

TTRPG Supplement This article is an orphan, as no other articles link to it. Please introduce links to this page from related articles; try the Find link tool for suggestions. (October 2019) Dungeon Drawings is a 1981 fantasy role-playing game supplement. Contents Dungeon Drawings is a book of illustrations representing a variety of dungeon scenery to depict rooms and corridors with appropriate furnishings and assorted debris.[1] Reception Denis Loubet reviewed Dungeon Drawings in The Sp…

Type of motor racing For the television series, see Drag Race (franchise). Drag race redirects here. For other uses, see Drag race (disambiguation). This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Drag racing – news · newspapers · books · scholar · JSTOR (June 2023) (Learn how and when to remove this template m…

HMS Repulse  Reino Unido Operador Marinha Real Britânica Fabricante John Brown & Company Batimento de quilha 25 de janeiro de 1915 Lançamento 8 de janeiro de 1916 Comissionamento 18 de agosto de 1916 Identificação 34 Destino Afundado por ataques aéreosem 10 de dezembro de 1941 Características gerais (como construído) Tipo de navio Cruzador de batalha Classe Renown Deslocamento 32 740 t (carregado) Maquinário 2 turbinas a vapor42 caldeiras Comprimento 242 m Boca 27,5 m Calad…

Adolfo Federico de Mecklemburgo Gobernador de Togolandia 19 de octubre de 1912-31 de agosto de 1914Monarca Guillermo IIPredecesor Edmund Brückner Presidente del Comité Olímpico Alemán 1948-1949Predecesor Karl Ritter von Halt Presidente del Comité Olímpico Nacional de Alemania 1949-1951Sucesor Karl Ritter von Halt Información personalNacimiento 10 de octubre de 1873Schwerin, Gran Ducado de Mecklemburgo-SchwerinFallecimiento 5 de agosto de 1969Eutin, Alemania OccidentalSepultura Schleswig-H…

Stasiun Kōriyamatomita郡山富田駅Pintu masuk stasiun pada April 2017LokasiMansuida, Tomita-machi, Kōriyama-shi, Fukushima-ken 963-8041JepangKoordinat37°25′13.3″N 140°22′10.2″E / 37.420361°N 140.369500°E / 37.420361; 140.369500Koordinat: 37°25′13.3″N 140°22′10.2″E / 37.420361°N 140.369500°E / 37.420361; 140.369500Pengelola JR EastJalur■ Jalur Banetsu BaratLetak dari pangkal3.4 km dari KōriyamaJumlah peron1 peron samp…

Diana và Actaeon, tranh của Titian (1556–59) Thần thoại Hy Lạp Các vị thần Thần nguyên thủyTitan Thần trên đỉnh OlympusPan và các Thần nữ Thần biểnThần đất Các anh hùng Heracles / Hercules (12 kỳ công) AchillesHector (Chiến tranh thành Troia) Odysseus (Odyssey) JasonArgonauts (Bộ lông cừu vàng) Perseus (MedusaGorgon) Oedipus (Nhân sư) Orpheus (Orphism) Theseus (Minotaur) Bellerophon (P…

American priest of the Catholic Church His Excellency, The Most ReverendGerardo Joseph ColaciccoAuxiliary Bishop of New YorkTitular Bishop of ErdoniaArchdioceseNew YorkAppointedOctober 10, 2019InstalledDecember 10, 2019Other post(s)Titular Bishop of ErdoniaOrdersOrdinationNovember 6, 1982by Terence CookeConsecrationDecember 10, 2019by Timothy M. Dolan, Henry J. Mansell, and Gerald Thomas WalshPersonal detailsBorn (1955-09-19) September 19, 1955 (age 68)Poughkeepsie, New YorkMottoC…

Metropolitan area in IrelandGreater Dublin AreaMetropolitan areaMap of Dublin and its hinterland, showing: Dublin city (red), city and suburbs (orange), Dublin Metropolitan Area (Yellow), Greater Dublin Area (NTA) (Green)Maximal definition: 1. Dublin city, 2. Dún Laoghaire–Rathdown, 3. South Dublin, 4. Fingal, 5. Meath, 6. Kildare 7. WicklowCountryIrelandArea • Total6,986 km2 (2,697 sq mi)Population (2022) • Total2,082,605 • Density300/k…

Kembali kehalaman sebelumnya

Lokasi Pengunjung: 3.143.24.14